php echo html anchor blog add_post Add post foreach posts as post echo

1
2
3
4
5
6
7
8
<?php
echo '<p>'.html::anchor('blog/add_post/', 'Add post').'</p>';
foreach($posts as $post)
{
echo '<h1>'.html::anchor('blog/view_post/'.$post->id, $post->title).'</h1>';
echo '<p>'.$post->text.'</p>';
}
?>