Assignment of PHP Group pointers
$arr=array();$arr['imagePath']="";$arr['Size1']="";$arr['imageaPath']="";$arr['image2Path']="";$arr['Size33']="";$arr['image5Path']="";$arr['Size55']="";$arr['imagebbPath']="";$arr['imageccPath']="";$arr['Size555']="";$arr['imageqqPath']="";$arr['image99Path']="";$arr['imageeePath']="";$arr['imagepPath']="";$arr['Size66']="";$url='/';$arr['imagePath']=$url;$arr['imageaPath']=$url;$arr['image2Path']=$url;$arr['image5Path']=$url;$arr['imagebbPath']=$url;$arr['imageccPath']=$url;$arr['imageqqPath']=$url;$arr['image99Path']=$url;$arr['imageeePath']=$url;$arr['imagepPath']=$url;
Reply to discussion (solution)
Q?
$arr=array();$arr['imagePath']="";$arr['Size1']="";$arr['imageaPath']="";$arr['image2Path']="";$arr['Size33']="";$arr['image5Path']="";$arr['Size55']="";$arr['imagebbPath']="";$arr['imageccPath']="";$arr['Size555']="";$arr['imageqqPath']="";$arr['image99Path']="";$arr['imageeePath']="";$arr['imagepPath']="";$arr['Size66']="";$url='/';$arr['imagePath']=$url;$arr['imageaPath']=$url;$arr['image2Path']=$url;$arr['image5Path']=$url;$arr['imagebbPath']=$url;$arr['imageccPath']=$url;$arr['imageqqPath']=$url;$arr['image99Path']=$url;$arr['imageeePath']=$url;$arr['imagepPath']=$url;
This assignment method seems a little strange.
Q?
This assignment method seems a little strange.
$ Url = '/';
$ Arr ['imagepath'] = $ url;
$ Arr ['imageapath'] = $ url;
$ Arr ['image2path'] = $ url;
$ Arr ['image5path'] = $ url;
$ Arr ['imagebbpath'] = $ url;
$ Arr ['imageccpath'] = $ url;
$ Arr ['imageqqpath'] = $ url;
$ Arr ['image99path'] = $ url;
$ Arr ['imageeepath'] = $ url;
$ Arr ['imageppath'] = $ url;
What is "strange" about this?
It looks clear.
foreach($ar as $k=?&$v) if(substr($k, -4) == 'Path') $v = $url;
What is "strange" about this?
It looks clear.
foreach($ar as $k=?&$v) if(substr($k, -4) == 'Path') $v = $url;
Consult
$ K =? & $ V ??
$ K => & $ v
Sorry, an error occurred while pressing the key.
$ K => & $ v
Sorry, an error occurred while pressing the key.
Address reference, I did not expect it !!!!! Good way!
The same is true if it is not referenced.
foreach($ar as $k=>$v) if(substr($k, -4) == 'Path') $ar[$k] = $url;
$val){ if(substr($key,0,5)=='image'){ $arr[$key] = $url; }}print_r($arr);?>