Re: Removing non-numbers

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

 



On Mon, 14 Feb 2005 18:54:03 -0700, Ben Miller <benipmiller@xxxxxxxxxxx> wrote:
> OK - easy one here, I know.  Having troubles removing anything that is not a
> number from user input.  According to manual, [!] is supposed to mean set of
> non-matching optional characters.

$var = preg_replace( '/[^\d]/', '', $var );


-- 
Greg Donald
Zend Certified Engineer
http://destiney.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