Created
August 22, 2012 20:02
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Simplest solution to swap values between 2 variables | |
a=10; | |
b=20; | |
//now we want that a=20 and b=10; | |
we take new variable "C" | |
c=a; // c has 10 value | |
a=b; // a has 20 value | |
b=c; // b has 10 values now | |
//values are swapped | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment