The concept of descending 3 number is by compairing first number with other two numbers and first number should be greater than other so we compare first number with second number if second number greater than swap to first number same goes for first number with third number after this process the first number will be greater than two. Remaining two variable is checked and again compare assign greater number in second variable.This way it is descending.
<?php
function descending(){
$num1 = $_GET['num1']; // Let suppose $num1 = 1
$num2 = $_GET['num2']; // Let suppose $num2 = 2
$num3 = $_GET['num3']; // Let suppose $num3 = 3
if ($num1 < $num2) { // here $num1 (1) is less than $num2(2)
$temp = $num1; // $temp(2)
$num1 = $num2; // copy $temp(2) to $num1(2)
$num2 = $temp; // this process swap $num1(2) and $num(1)
}
if ($num1 < $num3) { // here $num1(2) and $num3(3) which is less so swap
$temp = $num1;
$num1 = $num3;
$num3 = $temp; //After swap $num1(3) & $num3(2)
}
//now at this time $num1 greatest among other two variable
if ($num2 < $num3) { //$num2(1) and $num3(2) so swap
$temp = $num2;
$num2 = $num3;
$num3 = $temp; // this way $num2 will be greater
}
echo "<br>";
//first error: After descending value store in $num1, $num2, and $num3
//not in $num1a, $num2a, and $num3a these variable.
echo $num1 . " , " . $num2 . " , " . $num3;
echo "<br>";
} // second error missing this curly bracket.
?>
Hope you understand and ignore my bad english. Happy Coding :)