Home > Backend Development > PHP Tutorial > ,能否帮忙下小弟解决这个有关问题吗,php foreach循环取到里面所有的值在静态页面显示

,能否帮忙下小弟解决这个有关问题吗,php foreach循环取到里面所有的值在静态页面显示

WBOY
Release: 2016-06-13 10:02:15
Original
795 people have browsed it

各位大哥,能否帮忙下小弟解决这个问题吗,php foreach循环取到里面所有的值在静态页面显示
 
 if($_POST[size]"")
  { $size=$_POST[size];
  $myarr=split("/",$size);
  $size1="";
  $size4=$size1.$size2.$size3;
 } 

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

上面这段代码如果直接用动态显示出来就加个echo 就可用直接显示,但是我本人是把它生成静态页面,,,,,

  加入我把size这个文本框礼输入1/2/3/4个字符,,,用/分割.然后循环出来,,,,,,,,但循环出来取到的值是最后一个4,,,我想要的是取到所有...然后生成到静态页面去.

  如下面:

 

希望能帮到我,,谢谢!

------解决方案--------------------
$size2 .= "";

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template