On Wednesday, August 29, 2012 2:52:17 PM UTC+4, Jeremy Burns wrote:
--$x (badly named variable) is an array. The first key will be 'Word', which is itself an array where each key represents a field in the table; so, for example, you could echo $x['Word']['id]; and that would print the id to screen.On 29 Aug 2012, at 11:21, Shiv Shankar <shiv....@gmail.com> 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, Nareh Tarasyan wrote:Hey, ppl. help me.I try this code:IndexsController.php$this->set('x', $this->Word->findByid(10));thenview/Indexs/index.ctpecho "word= ".$x;It echoesword=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 cake...@googlegroups.com.
To unsubscribe from this group, send email to cake-php+u...@googlegroups.com .
Visit this group at http://groups.google.com/group/cake-php?hl=en-US .
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 cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
No comments:
Post a Comment