$num1 =5;
$num 2 = 10;
while($num1 <= $num2) {
if($num1 <= $num2) {
$num1 = $num1 + 1;
$res = $num1;
echo $res.' ';
}
}
$num1 = 5;
$num2 = 10;
while ($num1 <= $num2) {
echo $num1++, ' ';
}
$num1 = 15;
$num2 = 10;
if ($num1 > $num2) {
$temp = $num1;
$num1 = $num2;
$num2 = $temp;
}
while ($num1 <= $num2) {
echo $num1++, ' ';
}