Source Code:
(back to article)
<?php $num = 3.14; if (filter_var($num, FILTER_VALIDATE_FLOAT)) { echo '$num is a decimal number'; } else { echo '$num is not a decimal number'; }
Result:
Report an issue