Re: [PHP-LANG] Variable Swap

[email protected] (Andrei Zmievski) Tue, 11 Dec 2001 08:20:39 -0600
Newsgroups php.lang
Message-ID <[email protected]>
On Mon, 10 Dec 2001, Bharath Bhushan Lohray wrote:
> Is there a way of swapping the values of two variables without involving a
> third variable.
> 
> something similar to the SWAP(A$,B$) of BASIC
> 
> I have a big variable(array) and I want to keep my script's memory
> requirements as low as possible.

list($b, $a) = array($a, $b);

-Andrei
* Reality isn't all it's cracked up to be. *