Home > Backend Development > PHP Tutorial > 关于两个$$数组问题

关于两个$$数组问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 13:25:13
Original
1024 people have browsed it

$jian2015="arr";$arr=array();$$jian2015[]=1;print_r($arr);
Copy after login

想给数组递增,上面$$jian2015[]=1;写法不行,提示错误

Fatal error: Cannot use [] for reading in D:\WWW\nshop\5.php on line 35


这个怎么解决呢


回复讨论(解决方案)

$jian2015="arr";$arr=array();array_unshift($$jian2015, 1);print_r($arr);
Copy after login

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