1
<?php foreach ($categories as $category):?>
<tr>
<td><?php echo $category['name'];?></td>
</tr>
<?php if(isset($category['sub_categories'])):?>
<?php foreach($category['sub_categories'] as $subcategory):?>
<tr>
<td style="margin-left:50px;padding-left:50px;"><span><?php echo $subcategory['name'];?></span></td>
</tr>
<?php endforeach;?>
<?php endif;?>
<?php endforeach;?>
的問題是,它僅顯示一個級別subcategories.How我展示無限嵌套類
我不能理解如何使loop.Kindly精心製作 –