i think str_replace is faster that ereg_replace

Jason

John Nichel <[EMAIL PROTECTED]> wrote: 
> 
> Jed R. Brubaker wrote:
> > Hi all!
> > 
> > I am creating a function that will remove punctuation from a string, 
> > however, I am wondering if PHP has a function somewhere that will do the 
> > same.
> > 
> > Right now my approach is to cycle through an array of punctuation and remove 
> > the items.
> > 
> > Anything already exist?
> > 
> > Thanks! 
> > 
> 
> You don't have to cycle through an array...
> 
> preg_replace ( "/[\.,\";'\:]/", "", $string )
> 
> -- 
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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

Reply via email to