hadeosdin Posted October 21, 2009 Share Posted October 21, 2009 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, $filter, $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 Link to comment https://forums.phpfreaks.com/topic/178532-word-filter-problem/ Share on other sites More sharing options...
hadeosdin Posted October 21, 2009 Author Share Posted October 21, 2009 take it no one can help? Link to comment https://forums.phpfreaks.com/topic/178532-word-filter-problem/#findComment-941587 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.