Re: More than one values returned?

From: Date: Tue, 19 Feb 2008 02:05:01 +0000
Subject: Re: More than one values returned?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269579@lists.php.net to get a copy of this message
On Monday 18 February 2008, Teck wrote: > Hi, > > > Is it possible to "return" more than one values in PHP? > > return $x; > return $y; > > They don't work for me. > > -T A function always returns a single value. That value can be an array. function foo() { return array(1, 2); } list($a, $b) = foo(); -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson

« previous php.general (#269579) next »