i make this function to replace strings in a text, from a database:
and it doesnt work. can some one help?PHP Code:function form_filter($text) {
$sql = "SELECT * FROM `form_filter`";
$query = mysql_query($sql);
while($a = mysql_fetch_array($query)) {
$new = str_replace($a['replace'], $a['with'], $text);
}
return $new;
}


Reply With Quote