Re: More than one values returned?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can't return more than one variable, but you can return an array that 
contains multiple values.


$x = array('val1', 'val2');

return $x;


-TG

----- Original Message -----
From: Teck <tek.katu@xxxxxxxxx>
To: php-general@xxxxxxxxxxxxx
Date: Tue, 19 Feb 2008 10:31:02 +0900
Subject:  More than one values returned?

> Hi,
> 
> 
> Is it possible to "return" more than one values in PHP?
> 
> return $x;
> return $y;
> 
> They don't work for me.
> 
> -T
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux