thinkphp模板中数组的输出

2019-08-12 16:37:31 浏览数 (1)

代码语言:javascript复制
$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>

0 人点赞