You can only as an array: function calculate_money($sum) { // some hanky panky calculations $myArr[] = $type; $myArr[] = $amount; return $myArr; }
or shorter: function calculate_money($sum) { return array($type, $amount); } "Faisal Abdullah" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi people. > Is it possible to return multiple values in a function. > For instance, i want to do something like this: > > function calculate_money($sum) > { > // some hanky panky calculations > return $type; > return $amount; > } > > Thanks! > > Sincerely, > Faisal > > ______________________________________ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php