View Single Post
Old 01-04-2008, 09:18 PM   #6 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

Ok, my new attempt - using bitwise operators to swap the values about:

PHP Code:
<?php

$a 
1;
$b 2;

$a ^= $b ^= $a ^= $b;

echo 
$a;
echo 
$b;
Alan
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote