<!--根据当前分站城市id,获取城市下面地区的id集合arrchildid-->
<!--{php $tags=tag("table=area&condition=areaid=$cityid&pagesize=8&order=arrchildid desc&template=null");}-->
{loop $tags $t}
{$t[arrchildid]}//输出获取到的字符串
{/loop}
<?php
//$t[arrchildid])为获取到的循环城市id 输出为:1466,1553,1554,1555,1556,1557,1558
$diquheji=(explode(",",$t[arrchildid]));//id分解为一维数组
//print_r($diquheji);
foreach ($diquheji as $key =>$value) {
$diquzong.="'".$value."',";//foreach .=循环输出每个ID,并添加''及分号;
}
$diquzong=rtrim($diquzong,",");//删除最后的符号
echo $diquzong;//输出测试 '1466','1553','1554','1555','1556','1557','1558'
?>