Grouping items in php
Posted
by c0mrade
on Stack Overflow
See other posts from Stack Overflow
or by c0mrade
Published on 2010-03-28T11:57:37Z
Indexed on
2010/03/28
12:13 UTC
Read the original article
Hit count: 295
Hello, I have a problem with sorting items in table in PHP. Here is what I want to achieve :
Item Item Item
Item Item Item
Item Item Item
Item Item Item
Item Item Item
How I mean to achieve this, well since I have a for each loop I can insert counter, and say after 5th item is listed write to another column, the thing is I'm not good with tables, I've tried something like :
for(...)
$counter++;
if(($counter%5) == 0){
echo "";
}
Not happening .. I hope you understood what I meant .. tnx
© Stack Overflow or respective owner