ThinkPHP Simple traversal array method analysis, thinkphp traversing array _ PHP Tutorial

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.