Re: multiple function returns
| From: | Hrishi | Date: | Thu, 25 Jan 2001 15:04:13 +0000 |
| Subject: | Re: multiple function returns | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-36625@lists.php.net to get a copy of this message | ||
On 25 Jan 2001 13:04:27 +0800, Jamie wrote:
> return array($lang_pref,$currancy_pref);
if you make this return array("language" => $lang_pref, "currency" =>
$currency_pref)
you can store the value and reference it by name (eg)
$prefs=your_func($whatever);
echo "language pref: ".$prefs["language"];
echo "currency pref: ".$prefs["currency"];
hope this helps.
Hrishi