在ecshop中获取数组长度??
在模板文件中:
{foreach from=$arr name='arr'}
{if $smarty.foreach.arr.iteration eq 1}
{$arr|@count} {*这里无法正确输出数组的长度!!结果就返回这个字符串怎么办??*}
{/if}
{/foreach}
求解救 。。。
在ecshop中获取数组长度??
在模板文件中:
{foreach from=$arr name='arr'}
{if $smarty.foreach.arr.iteration eq 1}
{$arr|@count} {*这里无法正确输出数组的长度!!结果就返回这个字符串怎么办??*}
{/if}
{/foreach}
求解救 。。。
2 回答1.4k 阅读✓ 已解决
1 回答1.1k 阅读✓ 已解决
2 回答858 阅读✓ 已解决
1 回答1k 阅读✓ 已解决
2 回答915 阅读
1 回答899 阅读
1 回答828 阅读
直接原生php语法,没必要纠结这种事情