Can you help me solve this problem? all the values in the phpforeach loop are displayed on the static page-php Tutorial

Source: Internet
Author: User
Tags php foreach
Can you help me solve this problem? all values in the phpforeach loop are displayed on the static page & nbsp; if ($ _ POST [size] & lt; & gt; & quot;) & nbsp; {$ size $ _ POST [size]; & nbsp; $ myarrsplit (& quot;, $ size ); can you help me solve this problem? in the php foreach loop, all the values in it are displayed on the static page

If ($ _ POST [size] <> "")
{$ Size = $ _ POST [size];
$ Myarr = split ("/", $ size );
$ Size1 =" ";Foreach ($ myarr as $ key => $ value){$ Size2 ="". $ Value ."";}$ Size3 ="";
$ Size4 = $ size1. $ size2. $ size3;
}

$ Html1 = str_replace ("{size}", $ size4, $ html1 );

The above code can be directly displayed by adding an echo if it is directly displayed dynamically, but I generate a static page ,,,,,

Add the size text box and enter 1/2/3/4 characters, separated. then it loops out, but the value obtained from the loop is the last 4. what I want is to get all... and then generate it to the static page.

As shown below:

1 2 3 4

Hope you can help me. thank you!

------ Solution --------------------
$ Size2. =" ". $ Value ."";

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.