You're using findByName in your controller, which returns a single element (a car not a cars array). Try findAllByName if you want to get more than one, or change your view code, removing the foreach loop
Pablo On 7/29/07, rtanz <[EMAIL PROTECTED]> wrote: > > > sorry here it is: > > <div class="cars"> > <h2>List Mazda Cars</h2> > > <table cellpadding="0" cellspacing="0"> > <tr> > <th>Id</th> > <th>Name</th> > <th>Model</th> > <th>Actions</th> > </tr> > <?php foreach ($cars as $car): ?> > <tr> > <td><?php echo $car['Car']['id']; ?></td> > <td><?php echo $car['Car']['name']; ?></td> > <td><?php echo $car['Car']['model']; ?></td> > </tr> > <?php endforeach; ?> > </table> > > </div> > > > > > > -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
