Re: Stripping chars in string but leaving numerics

From: Date: Wed, 02 Aug 2000 08:04:33 +0000
Subject: Re: Stripping chars in string but leaving numerics
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9642@lists.php.net to get a copy of this message
On Wed, 2 Aug 2000, Anders Dannberg wrote: > I need advice on how i should strip all characters in a string(including > special chars) but leave numbers (0-9) and store this in a > $formatted_string. Any ideas how i do this an easy way? > > So if i have a string with value "abcd*()123" i want the output to be "123" > > Thanks in advance. > Anders Perhaps the strtr() function would be useful here: http://www.php.net/manual/function.strtr.php > > > > -- Soeren Staun-Pedersen - staun@netwarriors.org ------ "The internet is full, beat it" - Me.

« previous php.general (#9642) next »