标签:
1、多维数组循环输出:(需要用到嵌套)——Volist 标签嵌套循环输出多维数组
//案例,多维数组:
Array ( [0] => Array ( [fruits] => Array ( [0] => Array ( [fruits1] => 苹果1 [fruits2] => 桔子1 [fruits3] => 香蕉1 ) ) [vegetables] => 白菜1 ) [1] => Array ( [fruits] => Array ( [1] => Array ( [fruits1] => 苹果2 [fruits2] => 桔子2 [fruits3] => 香蕉2 ) ) [vegetables] => 白菜2 ) )
//这样就可以了 <p>食物品种:</p><br /> <volist name="food" id="vo"> <volist name="vo[‘fruits‘]" id="f"> <p>水果1:{$f[‘fruits1‘]}</p> <p>水果2:{$f[‘fruits2‘]}</p> <p>水果3:{$f[‘fruits3‘]}</p> </volist> <p>蔬菜:{$vo[‘vegetables‘]}</p><br /> </volist>
2、
标签:
原文地址:http://www.cnblogs.com/yueryuermaomao/p/4731857.html