PHP Programing language

adplus-dvertising
Which type declare the given number is greater or small
Previous Home Next

<html>
<head>
<title>while loop </title>
</head>
<body>
<?php 
 $num = 1; 
 while ( $num <=10 ) 
{ 
if ($num < 5) 
{ 
print $num . " is less than 5 <br>"; 
} 
else 
{ 
print $num . " is not less than 5 <br>"; 
}	
$num++; 
} 
?> 
</body>
</html> 
output:
1 is less than 5 
2 is less than 5 
3 is less than 5
4 is less than 5 
5 is not less than 5 
6 is not less than 5 
7 is not less than 5
8 is not less than 5 
9 is not less than 5 
10 is not less than 5
Previous Home Next