* Thus wrote Matthew A. Blasinski ([EMAIL PROTECTED]): > Philip J. Newman wrote: > >My goal is to input the amount of Bytes used by a user as $inputbox and > >calculate how many kbs,megs,gigs along with $cost for the price per meg. > > [...] > > 3) Use a search and replace (regular expression) to replace commas with > empty strings. ereg_replace("," "", $string) - > http://us4.php.net/manual/en/function.ereg-replace.php
to go further with this you could make sure they enter a valid number: $string = ereg_replace("[^0-9.]", "", $string); Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php