Thread
:
Tip : Swap values of two variables without using a third variable
View Single Post
#
1
(
permalink
)
04-09-2008, 08:57 AM
dman_2007
Guest
Posts: n/a
iTrader:
/ %
Tip : Swap values of two variables without using a third variable
Here's a handy trick for you to swap values of two variables without using another variable :
Code:
list($a, $b) = array($b, $a);
The statement above will transfer value of variable $a to variable $b and vice versa.
dman_2007