Owen Winkler wrote: > 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 >
Hallo Owen, thank you, that works pretty good. I just thought there would be a more object-oriented way to do that (like post->itemindex or something like that). Thanks again! -- dahead, http://habari.dahead.de --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
