LTunderground
New Member
For the past couple of hours, I've been unsuccessfully trying to figure out the php code to display a list in three columns so that it has this order\[code\]A D GB E HC F I\[/code\]but I'm really lost. Can anyone help me with this?I currently only have code that lists in this order\[code\]A B CD E FG H I\[/code\]This is my current code:\[code\]echo '<table><tr>';foreach ($categories as $k=>$category){if($k%3==0 && $k!=0){ echo '</tr><tr>';}echo '<td><a href="http://stackoverflow.com/questions/13784137/category.php? category='.$category["id"].'">'.$category["category"].'</a></td>';}echo '</table>';\[/code\]