Word filter problem


Posted on 16th Feb 2014 07:03 pm by admin

Hello,

im trying to make a filter for words inputted in to my website but i want to store the swear word and the replacement for that word in a mysql db i have developed the code below;

Did you know?Explore Trending and Topic pages for more stories like this.
<?php

include("config.php");


$str = 'how are you have you got any money';




$result = mysql_query("SELECT * FROM table")
or die(mysql_error());

while($row = mysql_fetch_array( $result )) {
$words = array($row['word'],);
$filter = array($row['translated_word'],);


}
echo str_replace($words, $german, $str);
?>

but it just dose not return the filters how i need it to it will only list it as it returns them like

wordwordwordwordword

but i need it to return them like

word,word,word,word,word

how would i do this? please help me =] thanks
No comments posted yet

Your Answer:

Login to answer
209 Like 24 Dislike
Previous forums Next forums
Other forums

Need help with basic sql
Hi,

I am using oracle 10g, and having some small doubts related to sql , here goes the si

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

Anti Spam Code Problems
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

Storing the referrer in session... problems with tabs
Hello All

I am currently working on an ERP project based on the MVC methodology, when a user

Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i

Mouseover to edit (Ajax)
hi friends, can anyone help with the code behind to get this application working, please in VB (new

Pass sql into pl/sql and create RMAN duplicate script.
Hi,

I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

need help modifying script
Hi guys,

I'm fairly new to php and am having a bit of trouble modifying a script.

This

how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash