遍历数组

WBOY
WBOYOriginal
2016-06-23 14:23:12829browse

前台这么遍历数组应该没有错吧

<!--{loop $allinpaybank $bank}-->    <input id="check-{$bank}" type="radio" name="payment" value="{$bank}" />    <label for="check-{$bank}" class="{$bank} bankicon"></label><!--{/loop}-->


遍历在结果在页面显示的是
{loop $allinpaybank $bank}⊙{/loop} 


⊙为 checkbox


回复讨论(解决方案)

⊙ 为radiobox

这个应该是模板吧

demo:

{section name=loop loop=$News}    
       

{$News[loop].newsID}
       {$News[loop].newsTitle}
{/section}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn