Hello, I posted earlier about using regex to verify an amount inputted. They suggested using number_format();
Should this do the job or am i looking for something different all together.
$number = $_POST['amount'];
$amount = number_format($number, 2, '.', '');
if(isset($_POST['amount']) && $amount < 25.00 || strlen($_POST['amount']) < 4 || strlen($_POST['amount']) > 9
{
$errors[] = "The minimum payment amount is $25.00 and must be in proper format.";
}else{
$amt = trim($amount);
}