Well, regular expressions can be a bitch I agree
ereg("[0-9]+(.[0-9]{1,2})?$", $price);
That should do the trick for you, broken down it means
string must begin with a number. The number must occure at least 1 time. then it check if there is a patter that matches .number
the .number must occure either as .4 or .56 or it cannot occure at all.
If you wanted to have a dot added thent he whole thing would read
ereg("[0-9]+.{1}([0-9]{1,2})?$", $price);
which simply says. There MUST be a dot
Ia mnot an expert for regex, but that should work