![]() |
Smarty foreach控制循环次数的实现详解
在smarty中数组是经常会用到的,循环遍历数组用 section 或者 foreach ,如何得到数组长度或者判断一个数组个数呢
1.可以用{$array| count} 来试试。 Code:
{foreach from=$variable key=key name=name iteam=value}Code:
{foreach name=infolist from=$VIDEO_INFO_LIST item=infolist} |
| All times are GMT +8. The time now is 02:15 PM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.