2015-02-09 116 views

回答

0
<td><?php echo $cat->parent_id; ?> 
      <?php foreach ($category as $child): ?> 
       if($cat->parent_id == $child->category_id) 
       { 
        echo $child->name; 
        break; 
       } 
      <?php endforeach; ?> 
+0

是你的回答還是你的問題的擴展部分? – 2015-02-09 09:27:06