Re: Quick question on data formatting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 12:30 AM -0500 11/29/07, Robert Cummings wrote:
On Wed, 2007-11-28 at 22:19 -0700, Jon Westcot wrote:
 >
     $123,456.78  becomes 123456.78
     $24,680  becomes  24680
     1234B  becomes  1234

$number = ereg_replace( '[^[:digit:].]', '' );

Cheers,
Rob.

Sweet.

Another one of those staple functions we all should have (or at least me).

Thanks,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux