I\'m trying to pick out numbers with more than two decimals (more than two digits after the decimal separator). I cant\'t figure out why this doesn\'t work:
if (
You could use a regex:
$number = 1.12; //Don't match $number = 1.123; //Match $number = 1.1234; //Match $number = 1.123; //Match if (preg_match('/\.\d{3,}/', $number)) { # Successful match } else { # Match attempt failed }