遍历数组

WBOY
Release: 2016-06-23 14:23:12
Original
789 people have browsed it

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

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


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


⊙为 checkbox


回复讨论(解决方案)

⊙ 为radiobox

这个应该是模板吧

demo:

{section name=loop loop=$News}    
       

{$News[loop].newsID}
       {$News[loop].newsTitle}
{/section}
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!