I think it should be
$this->set('x', $this->Word->findById(10)); not $this->set('x',
$this->Word->findByid(10));
Shiv
On Wed, Aug 29, 2012 at 3:44 PM, AD7six <[email protected]> wrote:
> Have a look at what $x is.
>
> On Wednesday, 29 August 2012 12:08:04 UTC+2, Nareh Tarasyan wrote:
>>
>> 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. :/
>>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>
>
--
Shiv Shankar
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.