"Andras Kende" <[EMAIL PROTECTED]> wrote: > 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)); > ......
use a regular expression with ereg_replace(), like this: $metakeywords = ereg_replace('[0-9]', '', $metakeywords); hope that helps justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php