On Sat, Mar 9, 2013 at 2:40 AM, Joseph zhu <[email protected]> wrote:
>
> In the view,I use <?php //print_r($coursedatas);?>
> <?php foreach($coursedatas as $coursedata):?>
> <?php print $coursedata['Curriculum']['title'];?>
> <?php endforeach;?>
> but I can't get the value for field Curriculum.title
> how to get the value for filed Curriculum.title.
Sorry, I thought you meant that you wanted to extract just those
values. To print them from a loop, you need to do:
foreach($coursedatas['Curriculum'] as $curriculum)
{
echo $curriculum['title'];
Notice that the multiple arrays are under the Curriculum key.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.