PHP program to check if a given number is ODD or EVEN
PHP Program to check number is odd or even
In this tutorial, you will learn how to check Odd or Even Number in PHP.
Below is the php script to find the given number is odd or even.
<title>ODD or EVEN</title>
<h2>PHP script to find given number is ODD or EVEN </h2>
<form action="" method="post">
<input type="text" name="num" />
<input type="submit" />
$num = $_POST['num'];
echo "String not allowed.
Input should number";
if($num % 2==0)
echo "Number is an even number";
echo "Number is an odd number ";
Thanks for reading.
© Copyright - 2018 - 2023 | All rights reserved at Funda of Web IT