Home > Backend Development > PHP Tutorial > php-关于在htm文件中嵌入loop循环语句

php-关于在htm文件中嵌入loop循环语句

WBOY
Release: 2016-06-02 11:34:49
Original
1829 people have browsed it

phploophtm循环

我现在要做一个部门权限控制的页面。首先我在php文件中写好了几个数组,有一级部门,二级部门,三级部门。这三个部门是从属关系。比如一级部门是一维数组,二级部门是二维数组,三级部门是三维数组。在htm文件中我想到用loop循环显示。在第三级部门上每个加checkbox,选中提交之后再php文件中处理。现在的问题是,不清楚loop循环怎么写。我找到一个如下的写法:

<code><td>
<!--{loop $regularlist $regular}-->                         <span id="tr{$regular[id]}" class="grouplist" name="group{$regular[regulargroupid]}">                           <label><input type="checkbox" name="regular[]" id="regular{$regular[id]}" onclick="Regular.click(this)">                             checked="true"                              <!--{/if}-->                                >                               $regular[name]</label>                          </span>                         <!--{/loop}-->
</td></code>
Copy after login

我只需要那个$regular【name】,改为我自己的名字。那部门数组我应该怎么写?还有loop循环是htm语言里边的吗?还是其他语言嵌入的?
在此方面,我应该看哪方面的内容?

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