OK well recently whilst doing some work for someone on a classifieds site the man wanted a banner from Banner Bar to show every 5 adverts. But he wanted the banners to be shown in ascending order and only 1 at a time. After some playing around and a nights sleep i finally cracked it now i share this with you in the hope it may help you out.
This is the first time i’ve used the PHP Modulus Operator % which to my understanding is like divide.
As if($i % 3 == 0) means if $i divided by 3 is clean (Only whole numbers).
1 ÷ 3 = decimal numbers
2 ÷ 3 = decimal numbers
3 ÷ 3 = whole numbers so carry on with if statement
(Well this is my interruption of it)
Please see the demo which pulls chat up lines from a table and images from another and each one is shown in ascending order.


I was looking for a way to alert a user when their post count increased by 100. if($post % 100 == 0) worked for me.
Thanks my friend!