
- You are not logged in. | Login
November 16, 2006 8:49 pm
- franzkafka
- Member


how can i make a function that returns multiple values?
hi i've got a script im working on and i'm tryign to make a functiont that when sent a timestamp returns a date, the day of the week, and the difference between that date and now
i want to just send the time() to the function and get back all the data to use in my page
i know how to compute all of the values individually but i want to put them all in the same function so i can get back all of the values at the same time
please help!
November 23, 2006 1:38 pm
- senjor_itc
- Member


Re: how can i make a function that returns multiple values?
Hi!
try this:
<?php
function foo($bar){
$ret['time'] = $bar;
$ret['date'] = $bar . '!';
return $ret;
}
?>That's all!


