Re: str_replace question

From: Date: Tue, 16 Apr 2002 07:24:32 +0000
Subject: Re: str_replace question
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-93139@lists.php.net to get a copy of this message
preg_replace('/\d+/','',$the_string); Hope this helps. Andrey ----- Original Message ----- From: "Andras Kende" <andras@kende.com> To: <php-general@lists.php.net> Sent: Tuesday, April 16, 2002 4:29 AM Subject: [PHP] str_replace question > Is a nicer way to remove any number 1-0 from a string??? > > Currently: > $metakeywords=str_replace("1",'',strtolower($metakeywords)); > $metakeywords=str_replace("2",'',strtolower($metakeywords)); > $metakeywords=str_replace("3",'',strtolower($metakeywords)); > $metakeywords=str_replace("4",'',strtolower($metakeywords)); > $metakeywords=str_replace("5",'',strtolower($metakeywords)); > $metakeywords=str_replace("6",'',strtolower($metakeywords)); > ...... > > Thanks :) > > Andras Kende > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#93139) next »