qq_BeyonceInt_0
2015-12-12 01:19
为什么二维数组索引加关联形式里面的键不能用方括号只能用双引号?例如 $res=array (
[0]=>array("id" => "28" ,"username"=> "admin" ,"password" => "admin" ,"age" => "270"),
[1]=>array("id" => "29", "username" => "admin", "password" => "admin" ,"age" => "270"));
$res=array (
"0"=>array("id" => "28" ,"username"=> "admin" ,"password" => "admin" ,"age" => "270"),
"1"=>array("id" => "29", "username" => "admin", "password" => "admin" ,"age" => "270"));上面执行出来就是Parse error: syntax error, unexpected '[', expecting ')'
下面执行出来就对的
规定,
MVC架构模式分析与设计
82400 学习 · 929 问题
相似问题