how can i check number is valid with below string.
last 2 digit may content decimal value or may not.
below are the code which i have already tried with preg_match but couldn't get any success
$newPrice = "2,264.00"; or //  $newPrice = "264.00"; 
 if (!preg_match('/^[+-][0-9]+(\,[0-9]+)?%?$/', $newPrice))
{                
    echo "not valid";
 }else{                    
       echo "valid";
}
exit();
above both price is correct as per allowed format.
 
     
     
    
