On Sun, Nov 04, 2001 at 12:54:54AM -0700, [EMAIL PROTECTED] wrote:
> Why does PHP give a parse error if you do:
>
> echo array_keys($arr)[0];
>
> It makes you assign the result of the function to a var first like this:
>
> $arr = array_keys($arr);
> echo $arr[0];
>
> I just
Why does PHP give a parse error if you do:
echo array_keys($arr)[0];
It makes you assign the result of the function to a var first like this:
$arr = array_keys($arr);
echo $arr[0];
I just want to grab the 1st element of the array. Why does it make you do
it in 2 lines instea
2 matches
Mail list logo