Re: [Perchpole] News Page: One List or Three?
Hi,
I think the easiest way to accomplish this would be to select all of the stories first. Then have a counter that get's incremented after each story is outputted. You can then do your output with a simple if statement. Something similar to this:
<?php if($count==1): ?>
*OUTPUT TOP STORY*
<?php elseif($count>1 && $count<4): ?>
*OUTPUT FOR STORY 2 AND 3 *
<?php else: ?>
*OUTPUT FOR EVERYTHING ELSE*
<?php endif ?>
<?php $count++; ?>
This would work if you set $count=1 before you started your foreach loop and incremented it (<?php $count++?> )at the end of the loop.
Hope this points you in the right direction. If you run into any issues, please attach the .php file you're working with.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/