i m very new in cakePHP, pls help me some one about this error, which
is headeach for me.
=> i m getting error of [Undefined index] in abc view file.i m
pasting code here if some 1 got it then pls help me.
thanx
=>this controller file code for index...
function index() {
$this->Book->recursive = 1;
$books = $this->Book->find('all');
$this->set('books', $books);
}
=>and this one code for index.ctp
<?php foreach($books as $book): ?>
<tr>
<td><?php echo $book['Book']['isbn']; ?></td>
<td><?php echo $book['Book']['title']; ?></td>
<td><?php echo $book['Author']['name'] ;?></td>
</tr>
<?php endforeach; ?>
....i am waiting :)
--~--~---------~--~----~------------~-------~--~----~
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
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment