debug($posts);

On Tue, Feb 24, 2009 at 10:57 AM, sequence <[email protected]> wrote:
>
> im just trying to make work an example of cake to display news... but
> i get this error:
> Warning (2): Invalid argument supplied for foreach() [APP/views/posts/
> index.thtml, line 10]
>
> this is the code;
>
> <h1>View Posts</h1>
>
> <table>
> <tr>
>  <th>ID</th>
>  <th>Title</th>
>  <th>Created</th>
> </tr>
>
> <?php foreach ($posts as $post): ?>
>
> <tr>
>                <td><?php echo $post['Post']['id']; ?></td>
>                <td><?php echo $post['Post']['title']; ?></td>
>                <td><?php echo $post['Post']['created']; ?></td>
> </tr>
> <?php endforeach; ?>
> </table>
>
> i need some help ... thanks buddies..
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to