View Single Post
  #1 (permalink)  
Old 04-09-2008, 08:57 AM
dman_2007
Guest
 
Posts: n/a
iTrader: / %
Default 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.
Reply With Quote