PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..
<?php
$num1 = 20;
$num2 = 30;
echo "\nThe number before swapping is:\n";
echo "num1 = ".$num1." and num2= ".$num2 ;
$temp = $num1;
$num1 = $num2;
$num2 = $temp;
echo "\nThe number after swapping is: \n";
echo "num1 = ".$num1." and num2= ".$num2."\n";
?>
Result:
The number before swapping is:
num1 = 20 and num2= 30
The number after swapping is:
num1 = 30 and num2= 20
PHP is a server scripting language, and It is a powerful tool for making interactive and dynamic Web-pages. I have used WampServer 2.2 for following excercise..
Result:
need an explanation for this answer? contact us directly to get an explanation for this answer