TheFigster Posted July 2, 2006 Share Posted July 2, 2006 I'm perty sure this can be done, I just don't know how. I want to change this category map (not Menu) to be fluid and collapsible. This is my current code:[code]$c = $this->Categories;$categorymap = '';$count = 0;for ($i=0; $i<sizeof($c); $i++){ if ($c[$i]->parentid == 0){ $count++; if ($count == 1){ $categorymap .= '<tr>'; } $categorymap .= '<td valign=top>'."<a style='font-size:110%' href='{$c[$i]->url}'>{$c[$i]->title}</a>".'<br>'; for ($k=0; $k<sizeof($c); $k++){ if ($c[$k]->parentid == $c[$i]->id){ //subcategory $categorymap .= " <a href='{$c[$k]->url}'>{$c[$k]->title}</a>" .'<br>'; } } $categorymap .= '</td>'; if ($count == 3){ $categorymap .= '</tr>'; $count = 0; } }}if ($count != 0){ $categorymap .= '</tr>';}[/code]What do I need to change to get this to look even and be collapsible?I Apreciate the help! Quote Link to comment https://forums.phpfreaks.com/topic/13484-fluid-collapsible-table-with-php/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.