Hi i am using PHP for couple of years ,
these are the ways in PHP that i know to declare an array
$arr = array();
$arr = array(1,2);
$arr[0] = 1;
$arr[] = 1;
In an example I saw this syntax and I ran the code and it was valid:
$a{0} = "value";
but the following code didn't run:
$a{} = "value";
It gave:
Parse error: syntax error, unexpected '}'
How to explain this?