Re: returning more than 1 value from function

From: Date: Thu, 04 Jul 2002 18:59:06 +0000
Subject: Re: returning more than 1 value from function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-105486@lists.php.net to get a copy of this message
If you don't like arrays you can use objects: function multireturn() { $result->first = "Ticket #1"; $result->second = "Ticket #2"; return $result; } -- Sincerely, val petruchek "Andy" <news.letters@gmx.de> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:20020704171036.40495.qmail@pb1.pair.com... > hi there, > > i am wondering if it is possible to return more than 1 value from a > function? > > something like > > test(){ > return $value1, $value2 > } > > Thanx for any help, > > Andy > >

« previous php.general (#105486) next »