Jump to content

Remove Swear Words From Variable


d_barszczak

Recommended Posts

I am currently designing a Flash PHP MYSQL Chatroom which will allow users to have a chatroom on their website but hosted from mine.

The early beta version is availerble on my website for viewing.

I would like to add a content filter option to the client that stops users from submitting certain words so i need a way of removing or detecting certain words from a variable.

Once i do this i will be able to cycle through an array of words which are stored in a mysql database.

All this is done but just can't seem to find the command to find the words withing the variable.
Link to comment
https://forums.phpfreaks.com/topic/11845-remove-swear-words-from-variable/
Share on other sites

[!--quoteo(post=383161:date=Jun 13 2006, 10:08 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 10:08 AM) [snapback]383161[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]
foreach ($unallowed as $badword)
{
preg_replace ("/$badword/", "", $text);
}
[/code]
[/quote]

Thankyou i have searched for ages to find somthing to do that but i hate using forums when i have the manual sat on my desktop.

Cheers joquius. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.