如调用栏目id为1,2,7的栏目列表: {pc:get sql="select * from v9_category where catid IN (1,2,7)"} {loop $data $r} <a href="{$r['url']}">{$r[catname]}</a> {/loop} {/pc} 如需循环内递增效果: {pc:get sql="select * from v9_category where catid IN (1,2,7)"} {php $num=1} {loop $data $r} <a href="{$r['url']}">{$r[catname]}</a> {php $num++} <!--{php $num++} 在{/loop}内指在循环内递增--> {/loop} {/pc} 以下是多栏目调用实例: {pc:get sql="select * from v9_category where catid IN (1,2,7)"} {php $num=1} {loop $data $r} <div class='w_bzcont'> <div class="w_bz_l" id='wbz_0{$num}'> <div class="w_bz_l1"> <b>{$r[catname]}</b> <span>现在养生 防病在先</span> </div> <div class="w_bz_l2"> {pc:content action="category" catid="$r[catid]" num="6" order="listorder ASC"} {loop $data $m}<a href="{$m['url']}" target="_blank">{$m[catname]}</a>{/loop} {/pc} </div> </div> <div class="w_bz_r"> <div class="w_bz_r1"> {pc:content action="hits" catid="$r[catid]" order="weekviews DESC" num="1"} {loop $data $key $val} <b>{$val['title']}</b> <p>{$val[description]}....<a href="{$val['url']}" target="_blank">[全文]</a></p> {/loop} {/pc} <ul> {pc:content action="hits" catid="$r[catid]" order="weekviews DESC" num="10"} {loop $data $key $val} <li><a href="{$val['url']}" target='_blank'>{$val['title']}..</a></li> {/loop} {/pc} </ul> </div> <div class="w_bz_r2"> <img src="{$r[image]}" 221px height:270px> </div> </div> </div> {php $num++} {/loop} {/pc}