Yea, i know itbut i want other thing
For example when I click on some username, it opens all information about
the user and in address writes: ./?id=1
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake
*How do you pass parameters from controlller to view?*
*
*
*For example:*
*
*
* echo "".$i." "."";
*
* How to do it in cake?*
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscri
Yeah, Mark, I also thought so and tried, but it doesn't work. Doesn't echo
anything :/
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to
cak
Thanks Marcus
but u know what I did here... see:
$this->set('rand', rand(1,$this->Word->find('count')));
$this->set('randword', $this->Word->findById());
I want ID= value of rand function, but don know how to write it.
--
You received this message because you are subscribed to
Thanks people.
I tried all, but none helps.That variables work in index.ctp, but not in
view :/
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send ema
how can I use usual PHP functions in controller?
for example i use
$rand=rand(1,$number)
in View/index.ctp
but don know how to use in controller?
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@google
gt; example, you could echo $x['Word']['id]; and that would print the id to
> screen.
>
> On 29 Aug 2012, at 11:21, Shiv Shankar >
> wrote:
>
> It would return an array. so use print_r($x); not echo.
>
> On Wednesday, August 29, 2012 3:38:04 PM UTC+5:30, N
Hey, ppl. help me.
I try this code:
IndexsController.php
$this->set('x', $this->Word->findByid(10));
then
view/Indexs/index.ctp
echo "word= ".$x;
It echoes
word=Array;
What is the problem??? When I have loaded Word model in my
IndexsController, and I have a record with id=10 in db table.
Hi people.
I'm a beginner in CakePHP.
And I need help.
I try to use loadModel.
I have two models: games and words.
In db have two tables: games(where I keep game difficulty levels) and
words(where I keep words that I use in my game).
Now I created IndexsController, where I load two models.
He