Tuesday, August 2, 2011

PHP general variable or array control

//swap two variables

function swap (&$x, &$y) {

$x ^= $y ^= $x ^= $y;

} 

Reference:                                         
  1. http://www.bukisa.com/articles/30572_swap-variables-values-in-php

No comments:

Post a Comment