dh wrote:
> Hello guys,
> 
> i'd like my theme to show an image as a separator between each post, so 
> i simply added a div at the inner end of the foreach loop in home.php.
> 
> Now i don't want to show that separator image for the last post. How can 
> i achieve that?

<?php
$count = 0;
$total = count($posts);
foreach($posts as $post):
?>
...display post...
<?php if(++$count < $total): ?>
<img src="sep.jpg">
<?php endif; ?>
<?php endforeach; ?>

Something like that might work.

Owen

--~--~---------~--~----~------------~-------~--~----~
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/habari-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to