文章时间:2018年11月7日 20:49:40 ps:PHP原生调用
<?php
$category_tree = IndexModel::get_category_tree("and catid in(2,3) or parent in(2,3)");
foreach($category_tree as $v){
?>
<li class="dropdown">
<a href="/home.php/index/index/cat.html?catid=<?php echo $v['catid']?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<?php echo $v['cat_name']?>
</a>
<ul class="dropdown-menu">
<?php if(!empty($v['child'])){ $row=0; foreach($v['child'] as $vv){ $row++;?>
<li style="<?php if($row<4){ echo 'margin-bottom:3px;';}?>"><a href="/home.php/index/index/cat.html?catid=<?php echo $vv['catid']?>"><?php echo $vv['cat_name']?></a></li>
<?php } } ?>
</ul>
</li>
<?php }?>
<?php echo $item['title'];?>
<?php echo mb_substr($item['title'],0,30);?>
<?php echo date('Y-m-d',$item['add_time']);?>
<?php echo $find_category['context'];?>
{$find_category['context']}