accessing array values without square brackets in php
- by amb
In php how can I access an array's values without using square brackets around the key? My particular problem is that I want to access the elements of an array returned by a function. Say function(args) returns an array. Why is
$var = function(args)[0];
yelling at me about the square brackets? Can I do something like
$var = function(args).value(0);
or am I missing something very basic?