Re: return

From: Date: Mon, 16 Jul 2001 20:38:44 +0000
Subject: Re: return
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58116@lists.php.net to get a copy of this message
So sprach »Tyler Longren« am 2001-07-16 um 15:25:08 -0500 : > function? Currently, nothing is printed to the browser. No wonder, because you don't assign the returned value of expDate to anything.. well, if you want to return two values, I'd suggest to use an array, like so: function expDate($date){ $month = 08; // whatever $year = 15; // whatever $return_value = array( "month" = $month, "year" = $year ); return $return_value; } $date = expDate("4711"); print $date["month"] . " " . $date["year"]; Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 5 hours 23 minutes

« previous php.general (#58116) next »