, can you help the younger brother to solve this problem, PHP foreach loop to get all the values inside the static page display

Source: Internet
Author: User
Tags php foreach
Brother, can you help the younger brother solve this problem, PHP foreach loop to get all the values inside the static page display

if ($_post[size]<> "")
{$size =$_post[size];
$myarr =split ("/", $size);
$size 1 = " "; foreach ($myarr as $key = + $value) {$size 2 = "". $value." ";} $size 3 = "";
$size 4= $size 1. $size 2. $size 3;
}

$html 1=str_replace ("{size}", $size 4, $html 1);

If the above code is displayed directly with a dynamic display, it can be displayed directly by adding an echo, but I am using it to generate a static page,,,,,

Add me to the size of this text box to input 1/2/3/4 characters,,,/split. And then loop it out,,,,,,,, but the loop out takes the value is the last 4,,, what I want is to take all ... Then generate to the static page to go.

As below:

1234

Hope to help me, thank you!

------Solution--------------------
$size 2. = " ". $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.