Just a thought.. If it is only a comma, and it is a form field, why do this on the server side,
Perhaps a javascript onsubmit function that traps the comma (indexOf/charAt) and then shift the values over with substring. Since you know it's USD then you could do value.length-3 or something similar. You can also use the sprintf() function of php to keep the decimal places. Have fun! "Ben C ." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm trying to update a field which contains a $USD figure. But when I update it as 200,000 it become 200. I need to take out the comma. Is using ereg_replace function the best way of doing so? What do you think. > > Thanks, > > Ben > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php