当前位置:Gxlcms > PHP教程 > smarty二维数组读取

smarty二维数组读取

时间:2021-07-01 10:21:17 帮助过:6人阅读

{foreach item=foo from=$video key=fkey0}
{foreach item=foo_ from=$foo key=fkey1}
<div class="123">
< src='{$foo_}'></><a href="{$fkey0}">{$fkey1}</a></p>
</div>
{/foreach}
{/foreach}


二维数组smarty读取
[8] => Array
(
[动画短片《RUN!PIG!] => http://player.youku.com/player.php/sid/XNDIxMTMzNjg0/v.swf
)

[7] => Array
(
[爱情公寓 第三季] => http://player.youku.com/player.php/sid/XNDMzNDAzNjQw/v.swf
)

[6] => Array
(
[轩辕剑之天之痕] => http://player.youku.com/player.php/sid/XNDMwNTgxNDU2/v.swf
)

[5] => Array
(
[钟馗传说] => http://player.youku.com/player.php/sid/XNDM0MTc3NjI0/v.swf
)

while($rows=mysql_fetch_assoc($result))
{
$re_array[$row1['name']][$row1['img']]=$row1['link'];
}

人气教程排行