D
dman_2007
Guest
Here's a handy trick for you to swap values of two variables without using another variable :
The statement above will transfer value of variable $a to variable $b and vice versa.
Code:
list($a, $b) = array($b, $a);
The statement above will transfer value of variable $a to variable $b and vice versa.