miraclemaker
Programmer
When I am using a function that returns an array, but I only ever want to use a particular element of that array, is there a way I can access the element of the returned array straight away, without having to use a temporary variable to store the array?
eg:
If my function getParams() returns an array, but I only ever need the third element of the array that's returned, can I do something like this:
Thanks!
eg:
If my function getParams() returns an array, but I only ever need the third element of the array that's returned, can I do something like this:
Code:
$theparam = {getParams()}[3];
instead of
$temp_array_var = getParams();
$theparam = $temp_array_var[3];
Thanks!