Friday, 3 October 2014

is_real in PHP

is_real — Alias of is_float
This function is an alias of: is_float(). 
is_float — Finds whether a variable is a floatDescriptionbool is_float ( mixed var )

Finds whether the given variable is a float.

example:
<?php
$float=50.97;
if(is_float($float))
{
    echo $float."is a float";
}
else
{
    echo $float. "is not a float";
}
?>

output:
50.97 is a float

0 comments:

Post a Comment