Can anyone plaese help me with the following code? I had microstats installed and working and when I installed the username in posts hack, microstats quit working. I know the problem in the code, just not how to fix it so both of them will work. I know it can be done because they both work here.
Code:
$findwords=array(0 => '{getmicrostats}');
$replacewords=array(0 => $microstats);
$i=1;
$findwords=array(0 => '{bbusername}');
$replacewords=array(0 => "$bbuserinfo[username]<!-- auto name hack -->");
$i=1;
while ($var=$DB_site->fetch_array($vars) and $i++) {
if ($var['findword']!='') {
$findwords[$i]=$var['findword'];
$replacewords[$i]=$var['replaceword'];
}
}
$newtext=str_replace($findwords,$replacewords,$newtext);