RE: [PHP] return array
| From: | Martin Towell | Date: | Fri, 07 Jun 2002 03:42:58 +0000 |
| Subject: | RE: [PHP] return array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101072@lists.php.net to get a copy of this message | ||
that seems odd
I've got a function that returns an array something like you had in your
example. eg
function blah()
{
return array("C"=>3,"D"=>9,"M"=>1);
}
$arr = blah();
then doing echo $arr["C"] output's 3
-----Original Message-----
From: Jule Slootbeek [mailto:jslootbeek@clarku.edu]
Sent: Friday, June 07, 2002 1:06 PM
To: php-general@lists.php.net
Subject: Re: [PHP] return array
>
> try:
>
> list($doo, $dah) = my_function();
>
thanks alot
that was it
list ($array['name'], $array['password']);
Jule
--
Jule Slootbeek
jslootbeek@clarku.edu
http://blindtheory.cjb.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php