Return 2 things from a function
<p>I have a function that returns a multidimensional array, but I also need to return a single value.  I am currently using the single value via the global keyword, so I can modify it inside the function.</p>

<p>But I'm wondering if there is another/better way to return 2 values from a function?</p>

<p>Current (pseudo) code:</p>

<pre><code>global $iNumber;
$arrResult;
{do some calculations and queries}

$iNumber = 73;
return $arrResult; 
</code></pre>

<p>The function that called this function can use the array of arrays, and also the global variable which has been updated to 73.</p>

<p>But is there another/better way to combine or pass these two different values?</p>