How to display PHP arrays on the Frontend Page-php Tutorial

Source: Internet
Author: User
How to display the PHP array on the front-end page: PHP queries database data $ list. volist loops are used when the PHP array is displayed on the front-end page. Now you need to upload this array to the front-end page. the array cannot be changed. How to transfer


Reply to discussion (solution)

If it is in the tp action

$ This-> assign ("list", $ list );

View
 
 
  • Vo ["table fields"]

If it is in the tp action

$ This-> assign ("list", $ list );

View
 
 
  • Vo ["table fields"]

I know that this display is used to obtain the list value. I don't want to retrieve it now. I need to upload the list value to another page.

Json_encode is a string and then POST it to another page.

The result serialize is serialized and saved to the session. it is obtained from the session and unserialize is deserialized.

What do you want to save and pass it to other pages? Then you need to store $ list in cookies and sessions, and then transfer it. we will test the TP framework used by LZ.

What do you mean by passing?

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.