Swap two number using third variable program in PHP
<?php
$a=10;
$b=20;
echo "Value of a: $a</br>";
echo "Value of b: $b</br>";
$temp=$a;
$a=$b; $b=$temp;
echo "Value of a: $a</br>";
echo "Value of b: $b</br>";
?>
<?php
$a=10;
$b=20;
echo "Value of a: $a</br>";
echo "Value of b: $b</br>";
$temp=$a;
$a=$b; $b=$temp;
echo "Value of a: $a</br>";
echo "Value of b: $b</br>";
?>
Comments
Post a Comment