为什么二维数组索引加关联形式里面的键不能用方括号只能用双引号?
为什么二维数组索引加关联形式里面的键不能用方括号只能用双引号?例如 $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 ')'
下面执行出来就对的