Re: [PHP] eregi_replace probs

2001-11-16 Thread phantom
oh duh, why is it always the simplest reason. :) fixed it and it runs good now. thank you sir! Jim Lucas wrote: > sorry didn't notice the & in the args > you'll want this instead. > > > function scan_string(&$str) { > > $forbid = array ("coke", "tylenol", "ford"); > > $swap = array ("

Re: [PHP] eregi_replace probs

2001-11-16 Thread Jim Lucas
sorry didn't notice the & in the args you'll want this instead. > function scan_string(&$str) { > $forbid = array ("coke", "tylenol", "ford"); > $swap = array ("pepsi", "advil", "chevrolet"); > for ($i = 0; $i < count ($forbid); $i++) { > $str = eregi_replace($forbid[$i],$swa

Re: [PHP] eregi_replace probs

2001-11-16 Thread Jim Lucas
eregi_replace isn't your problem this funciton "RETURNS" the new string. > function scan_string(&$str) { > $forbid = array ("coke", "tylenol", "ford"); > $swap = array ("pepsi", "advil", "chevrolet"); > for ($i = 0; $i < count ($forbid); $i++) { > $NEW_STRING = eregi_replace(