Jump to content

Array!


xyn

Recommended Posts

Hey,
I have a language filter, which returns "Array"
I'm not sure why :S

my code...
function FilterWords($w1)
{
  $sql = mysql_query("SELECT * FROM filter");
  $words = array();
  $replace = array();
  while ($x = mysql_fetch_array($sql))
  {
$words[] = $x['badword'];
$replace[] = $x['replace'];
  }

$return['1'] = str_replace($words, $replace, $w1);
return $return;
}

I use this... INSERT INTO table (*fields*) VALUES ('".FilterWords($_POST[field])."')
Link to comment
https://forums.phpfreaks.com/topic/28669-array/
Share on other sites

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.