View Single Post
11-20-2011, 08:31 AM
#2
ExpertsGuide is offline ExpertsGuide
Status: I'm new around here
Join date: Nov 2011
Location:
Expertise:
Software:
 
Posts: 3
iTrader: 0 / 0%
 

ExpertsGuide is on a distinguished road

  Old

You are printing outside the foreach loop.
Try this,

PHP Code:
<?php 
    $child 
getChild(); 
    echo 
"\n<ul>\n" 
        foreach (
$child as $childcat) { 
            
$cat_id $childcat['cat_id']; 
            
$cat_name $childcat['cat_name']; 
            
$url $_SERVER['PHP_SELF'] . "?c=$cat_id"
            echo 
"<li><a href=\"" $_SERVER['PHP_SELF'] . "?c=$cat_id"\">$cat_name</a></li>\n";
        }  
    echo 
"</ul>" 
?>