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

关于两个$$数组有关问题

WBOY
Release: 2016-06-13 12:25:34
Original
888 people have browsed it

关于两个$$数组问题

本帖最后由 u013366173 于 2015-10-10 11:35:49 编辑
<br />$jian2015="arr";<br />$arr=array();<br />$$jian2015[]=1;<br />print_r($arr);<br /><br />
Copy after login

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

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


这个怎么解决呢
------解决思路----------------------
$jian2015="arr";<br />$arr=array();<br />array_unshift($$jian2015, 1);<br />print_r($arr);<br />
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