How to determine whether a variable is a decimal and it is less than 0.01 in PHP? If I write
if($balance<0.01)
Will a
true
value be returned if
$balance
is not a decimal at all?
How to determine whether a variable is a decimal and it is less than 0.01 in PHP? If I write
if($balance<0.01)
Will a
true
value be returned if
$balance
is not a decimal at all?
use if( is_numeric($balance) && $balance < 0.01 )