php form detect if number has decimals

143

php form detect if number has decimals -

function is_decimal( $val )
{
    return is_numeric( $val ) && floor( $val ) != $val;
}

Comments

Submit
0 Comments