for loop assignment problem?
杜文涛
杜文涛 2017-10-10 15:49:35
0
1
1163

//m.sbmmt.com/code/5179.html

In this tutorial, the information from the for loop is assigned to the session, and the information is looped out like this Only one number is obtained;


for($i=0;$i<4;$i ){
$color=imagecolorallocate($image,rand(0,255),rand(0,255 ),rand(0,255));
$x=100/4*$i 7;
$y=rand(0,20);
$size=6;
$content=rand (0,9);
$yzxx="$content";
imagestring($image,$size,$x,$y,$content,$color);
}
$_SESSION ['yzxx']=$yzxx;
var_dump($_SESSION);

杜文涛
杜文涛

reply all (1)
路过

$yzxx .= "$content"; You are missing a "." in front of the equal sign

  • reply Thank you. Newbies are not very good at it.
    杜文涛 author 2017-10-10 19:35:48
  • reply I took a look at the tutorial. I guess everything was written wrong in the tutorial.
    杜文涛 author 2017-10-10 19:40:29
  • reply Who is not a newbie? come on
    路过 author 2017-10-11 08:41:45
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!