As others have said, you pretty much have to use a temporary variable:
$temp = myFunction(); $value = $temp[0];
But, if you know the structure of the returned array, you can avoid the temporary variable.
If you need only the first element:
$value = reset(myFunction());
If you want to use the last element:
$value = end(myFunction());
If you need any of them:
// second member list(, $value) = myFunction(); // third list(, , $value) = myFunction(); // or if you want more than one: list(, , $thirdVar, , $fifth) = myFunction();
nickf
source share