How to display odd even number without using submit button using PHP?
It is possible?
Â
Display odd even number without submit button PHP
Hi Rhon,
I didn't get exactly what you want to do. If you just want to display it in a form then take a look at this sample:
<?php
for($i = 0;$i<99;$i++)
{
$var = rand(1,100); // take random seed and decide whether it is odd of even
Â
if($var % 2 == 0) // check if even
{
echo $var." is Evenn"; // simply display even number  in the browser
}
else  // must be odd
{
echo $var. " is Oddn"; // simply display odd number in the browser
}
}
?>
Â
Â
Â
I hope it helped.