RE: [PHP] function return
| From: | Rudolf Visagie | Date: | Tue, 28 May 2002 09:35:22 +0000 |
| Subject: | RE: [PHP] function return | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-99456@lists.php.net to get a copy of this message | ||
Hi,
function myFunction($some_vars, &$max, &$some_value)
{
$max=count($some_vars);
$some_value=($max/2);
//return true;
}
Rudolf Visagie
Principal Software Developer
Digital Healthcare Solutions
<mailto:rudolf@dhsolutions.co.za>
Tel: + 27 011 2655478
Cell: + 27 82 895 1598
-----Original Message-----
From: W. Enserink [mailto:enserink@pdd.nl]
Sent: Tuesday, May 28, 2002 10:02 AM
To: php-general@lists.php.net
Subject: [PHP] function return
Hi all,
I have a Q about functions. My function should return 2 values. What syntax
should I use and how do I call these values outside the function? Are these
values returned as en array or something?
this is what I have now,
-----------------------------
function myFunction($some_vars)
{
$max=count($some_vars);
$some_value=($max/2);
return($some_value && $max);
}
$var1=should be the value of $some_value
$var2=should be the value of $max
thx. Wilbert
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
info@pdd.nl
-------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php