Home > Backend Development > PHP Tutorial > ThinkPHP simple traversal array method analysis, thinkphp traverses array_PHP tutorial

ThinkPHP simple traversal array method analysis, thinkphp traverses array_PHP tutorial

WBOY
Release: 2016-07-12 08:52:05
Original
1376 people have browsed it

Analysis of thinkPHP's simple array traversal method, thinkPHP's simple array traversal method

This article analyzes thinkPHP's simple array traversal method through examples. Share it with everyone for your reference, the details are as follows:

has the following array:

array(
  array(
    'id'=>1,
    'username'=>'mgckid',
    'sex'=>1
  )
  array(
    'id'=>2,
    'username'=>'yezi',
    'sex'=>0
  )
)
Copy after login

thinkphp template tag writing method:

<volist name='data' id='vo'>
  <{$vo.id}>---------<{$vo.username}>-----------<{$vo.sex}><br/>
</volist>
Copy after login

Traversal results:

1---------mgckid-----------1
2---------yezi-----------0
Copy after login

Attached is a comparison of how to write the Dreamweaver tag to enhance understanding:

{dede:arclist typeid='20' row='5' titlelen='40'}
  [field:title/]  [field:arcurl/] [field:pubdate/] [field:infos/] [field:writer/]
{/dede:arclist}

Copy after login

Supplement: The editor here recommends a PHP formatting and beautifying typesetting tool on this website to help you code typesetting in future PHP programming:

PHP code online formatting and beautification tool: http://tools.jb51.net/code/phpformat

Readers who are interested in more thinkPHP-related content can check out the special topics on this site: "ThinkPHP Getting Started Tutorial", "ThinkPHP Common Methods Summary", "Smarty Template Basic Tutorial" and "PHP Template Technology Summary".

I hope this article will be helpful to everyone’s PHP programming based on the ThinkPHP framework.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1127888.htmlTechArticleAnalysis of thinkPHP simple traversal array method, thinkphp traversal array This article analyzes thinkPHP simple traversal array method with examples. Share it with everyone for your reference, the details are as follows: There are the following arrays...
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