thinkPHP中多维数组的遍历方法

$drug=array( 'ACEI'=>array(array('ch_name'=>'脚本之家','en_name'=>'captopril'),array('ch_name'=>'脚本下载','en_name'=>'enalapril'), array('ch_name'=>'赖诺普利','en_name'=>'lisinopril')), 'ARB'=>array(array('ch_name'=>'脚本源码','en_name'=>'eprosartan'), array('ch_name'=>'jb51','en_name'=>'candesartan'), array('ch_name'=>'PHP学习','en_name'=>'losartan'),array('ch_name'=>'JS学习','en_name'=>'valsartan'), array('ch_name'=>'脚本教程','en_name'=>'irbesartan')), );

<foreach item="vo" key="k"> <label> <input type="checkbox" value="1">{$k} </label> <foreach item="drug"> <label> <input type="checkbox" value="1">{$drug.ch_name} </label> </foreach> </foreach>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/e2f6f7fdb5ae947cb3cdf5b3ff096149.html