to be web-adminable, which means have the data stored in mySQL DB and
then using variables on php to pull.
The way i set it up for now is
Table= filter
Fields= word, replace
and the php would be
Code: Select all
$getWord = mysql_query("SELECT * FROM filter ");
$checkWord = mysql_fetch_array($getWord);
$Word = $checkWord['word'];
$Replace = $checkWord['replace'];
if ($Word == $Word) {
$html = preg_replace("#$Word#i", "$Replace", $html);
}else{
}How do I change it so it will replace anyword that matches whats in the DB?