ThinkPHP simply traverses the array method for analysis, and thinkphp traverses the array. ThinkPHP Simple traversal array method analysis, thinkphp traversal array This article analyzes thinkPHP Simple traversal array method. For your reference, we have the following arrays: thinkPHP Simple traversal array method analysis, thinkphp traversing array
This article analyzes thinkPHP's simple array traversal method. We will share this with you for your reference. The details are as follows:
There are the following arrays:
Array ('id' => 1, 'username' => 'mgckid', 'sex' => 1) array ('id' => 2, 'username' => 'yezi', 'sex' => 0 ))
Thinkphp template tag syntax:
<{$ Vo. id}> --------- <{$ vo. username}> ----------- <{$ vo. sex}>
Traversal result:
1 --------- mgckid ----------- 12 --------- yezi ----------- 0
Attach the Zhimeng label writing method to enhance understanding:
{Dede: arclist typeid = '20' row = '5' titlelen = '40'} [field: title/] [field: arcurl/] [field: pubdate/] [field: infos/] [field: writer/] {/dede: arclist}
Supplement: The editor recommends a php formatting and formatting typographical tool on this site to help you typeset code in future PHP programming:
Php code online formatting and beautification tools:Http://tools.jb51.net/code/phpformat