thinkphp的数组在模版输出是频率很高的操作. 我在后action内一般是把数据都绑定到变量内,当然是以数组的形式.select后的操作如下 .
$this->assign('design_img',$design_img);
//thinkphp 一维数组输出
<foreach name="design_img" item="vo">
<input type="text" name="design_img[]" value="{$vo}" />
</foreach>
//二维数组
<volist name="design_img" id="design_img">
{$design_img.name}
</volist>
//多维数组
<volist name="design_img" id="vo">
{$vo.name}
<volist name="vo['voo']" id="sub">
{$sub.name}
</volist>
</volist>