Re: [PHP] Replacing with f*ck and f*cking

2008-10-26 Thread Stan Vassilev | FM
My question is this, for just two words its fine to use the above, but a pal tells me that if using a lot of words (eg: 15) and the $comment is big then it can take quite some time and be a bit of a processing strain as well because php first checks the first word from the good list against

Re: [PHP] Replacing with f*ck and f*cking

2008-10-26 Thread Ashley Sheridan
On Sun, 2008-10-26 at 10:18 +0200, Stan Vassilev | FM wrote: My question is this, for just two words its fine to use the above, but a pal tells me that if using a lot of words (eg: 15) and the $comment is big then it can take quite some time and be a bit of a processing strain as well

Re: [PHP] Replacing with f*ck and f*cking

2008-10-26 Thread Larry Garfield
On Sunday 26 October 2008 5:06:09 am Ashley Sheridan wrote: Obviously, this list could get pretty comprehensive, so like Andrew said, maybe you should look to see how some of the open source projects do it. Ash www.ashleysheridan.co.uk The way Drupal handles such filtering is simple

[PHP] Replacing with f*ck and f*cking

2008-10-25 Thread Ryan S
Hey! I'm just trying to replace some of the more bad words with their slightly censored counterparts like so $bad_words = array(/*Well you know the words so am not going to write them here*/); $bad_words_replacements = array(f*ck, f*cking); $comment =

Re: [PHP] Replacing with f*ck and f*cking

2008-10-25 Thread Andrew Barnett
Maybe you should look at the source code of an open source project that can already do this such as phpBB. I'm not exactly sure where to find it in the phpBB code though. Andrew 2008/10/26 Ryan S [EMAIL PROTECTED] Hey! I'm just trying to replace some of the more bad words with their