PHP/Data Type/floatval
Checking for a floating point number
if ($_POST["price"] != strval(floatval($_POST["price"]))) {
$errors[] = "Please enter a valid price.";
}
if ($_POST["price"] != strval(floatval($_POST["price"]))) {
$errors[] = "Please enter a valid price.";
}