|
|
|
<?
if (empty($integerNo)){
?>
<p>ZERO</p>
<?
}else{
if($integerNo % 2){
?>
<p>ODD</p>
<?
}else{
?>
<p>EVEN</p>
<?
}
}
?> |
|
| Library of math functions to expand the functionality of PHP3. Version 1.2.1 fixes a major problem with the gcd function.
Categories : Algorithms, PHP, Math. | | | Diffusion-Limited Aggregation visualization Categories : PHP, Graphics, Algorithms, Math. | | | Show the steps for converting a number from a given base to base 10. Shows the steps involved in converting a number from a given base to base 10. Categories : PHP, Math., Algorithms | | | Prime number finder (Sieve of Erastothenes) Categories : PHP, Algorithms, Math. | | | Dollar Serial Number Validator Categories : PHP, Security, Algorithms | | | A very simple and efficient split bar the B-Z bar , for mysql and php ...
Tired of obfuscated code try this one ...
Categories : PHP, Databases, MySQL, Algorithms | | | IPhider Obscure Any URL Anonymity connection lores obfuscation corporate survival. Categories : PHP, Algorithms, Security, URLs | | | PHP Function to Encrypt/Decrypt a string without a known key. The string itself has his own different key for every character. Categories : PHP, Algorithms, Security, Authentication, Encryption | | | Credit Card Identification and Validation Class - The credit_card class provides methods for cleaning, validating and identifying the type of credit card numbers. Categories : PHP, PHP Classes, Credit Cards, Ecommerce, Algorithms | | | Math operations on big numbers Categories : PHP, Math. | | | Latitude-Longitude to Miles Categories : PHP, Utilities, Math. | | | Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET Categories : Algorithms, HTML and PHP, PHP, Variables | | | A very simple way to build and do a hierarchical html categories browser without javascript , just using html php and mySql
Categories : HTML and PHP, Databases, Algorithms, PHP, MySQL | | | Weighted Random - Random Scripts usually chose one out of each item, and each item have an equal chance to be chosen. But what if you want an item to be chosed more frequently than other? Categories : PHP, Math., Arrays | | | Boolean Keyword Interpreter Categories : PHP, Algorithms, Search Engines | |
| | | | Mahendra Kalkura wrote :816
hey buddy
look at the code below
this thing works fine for me
test it out and tell me if it works for you ok
========================================
<?
$integer=676;
if (empty($integer))
{
print("ZERO");
}
else
{
if(($integer % 2)==1)
{
print("ODD");
}
else
{
print("EVEN");
}
}
?>
========================================
| |
|
|
|