but for some reason 3 and 5 do not run correctly. $3 and $5 do.
here is my code:
Code: Select all
<?
if(!ereg("^(\\$)?(ї0-9]+|ї0-9]{1,3}(,ї0-9]{3})*)(\.ї0-9]{1,2})?$", $price)) {
$invalidPriceMessage = "Price must be a number.";
$wasAnError = "1";
}
echo "$wasAnError";
?>