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;

<?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

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

Need help with cin setw
I made a program here is my code:

#include
#include
#i

Problem executing bash script using shell_exec
Hi there,
I created a bash script file using following code to convert doc documents to pdf using

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

Get last modified date of web page
Hai All,

In php how can i get last modified date of a give web page . I have tried to g

db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

weird problem
last time, i did post a topic concerning why my page sometime will load as blank page when using IE.

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