Say for instance I have ...
$var1 = \"ABC\" $var2 = 123
and under certain conditions I want to sw
Yes, try this:
// Test variables $a = "content a"; $b = "content b"; // Swap $a and $b list($a, $b) = array($b, $a);
This reminds me of python, where syntax like this is perfectly valid:
a, b = b, a
It's a shame you can't just do the above in PHP...