TheFigster
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
fluid collapsible table with php?
in PHP Coding Help
Posted
[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!