You can't do it this way. You have to assign it to a variable first, UNLESS:
You just want to get the first or the last item of the array. Then you can do:
... but if you're planning on using more than one of the items from the array, then I suggest signing it to variable first, because this way you don't have to call the function multiple times.
(In Javascript you can use this syntax, and I think it's very practical. I've seen quite a lot of people requesting this for PHP 6, so I guess we'll see what happens.)