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

关于两个$$数组问题

WBOY
WBOYOriginal
2016-06-23 13:25:13918browse

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

想给数组递增,上面$$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);

Statement:
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