Thursday, January 27, 2011

HABTM echo value like standard relationship

I might be missing the point on this, but I am trying to echo out a HABTM value in my index, and I cannot seem to get the data.

For example, I can echo these relationships with no issue:

<?php echo $plan['Age']['name']; ?> <br />
    
<?php echo $plan['Applicant']['name']; ?> <br />

As you can see from the _id recursive relation on the Plan model.

Hope my question is clear. Just not sure what to do on this. Can't seem to resolve it no matter the combination of vars I try.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: