PHP extracts a lot of data from the database and cyclically outputs the data in the table on the html page.

Source: Internet
Author: User
PHP extracts a lot of data from the database, cyclically outputs a lot of data from the database in the html page table, and cyclically outputs the data in the html page table. Previously, thinkphp framework was used. Label. Currently, the thinkphp framework cannot be used. Native PHP is used. How does the data retrieved from the background be cyclically output to the html table?
For example, if $ result is a multi-dimensional array, it contains three fields: id, name, and age. How can they output the corresponding data to an html table?


Reply to discussion (solution)

  
 

Since it is mixed encoding, this should be enough.
Or add html tag processing in php ~~

  
 

Since it is mixed encoding, this should be enough.
Or add html tag processing in php ~~



  
 

Since it is mixed encoding, this should be enough.
Or add html tag processing in php ~~


I know this method is a little troublesome. Is there a simpler way? Like thinkphp's Tag


   
 

Since it is mixed encoding, this should be enough.
Or add html tag processing in php ~~



   
 

Since it is mixed encoding, this should be enough.
Or add html tag processing in php ~~


I know this method is a little troublesome. Is there a simpler way? Like thinkphp's Tag


Native php does not provide similar labels, which are provided by the thinkphp framework rather than provided by php. tags similar to smarty are a media instead of provided by php. therefore, you can use the smarty template, which provides similar labels

Isn't it similar, In the final analysis, the label is also a foreach traversal.

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.