Hi,
I've probably missed the really obvious here, but ...
I have a nifty little function that returns an array and the first element of the array indicates failure or some success status. In the vast majority of the cases, that first value is all I need. What I'd like to do is:
if (myFunc($arg1, $arg2)[0]>=0) {
// hoorah! it works. You get the idea
}
but PHP is not overly enamored of my [0] proposal. My question is, how do I extract the nth element of a returned array in place to avoid the two lines (of assignment; test) I'm currently using to do this?