Is it possible to have a function with two returns like this:
function test($testvar) { // Do something return $var1; return $var2; }
You can get the values of two or more variables by setting them by reference:
function t(&$a, &$b) { $a = 1; $b = 2; } t($a, $b); echo $a . ' ' . $b;
Output:
1 2