function scan_string(&$str) {
    $forbid = array ("coke", "tylenol", "ford");
    $swap = array ("pepsi", "advil", "chevrolet");
    for ($i = 0; $i < count ($forbid); $i++) {
         eregi_replace($forbid[$i],$swap[$i],$str);
    }
}

I run this script, and I know the array's load up and the for...do loop
runs ok.  As does the passing variable ($str).

I enter a test script such as "I like coke." and my returned value
remains "I like coke."

It appears the eregi_replace is the problem.

Any idea why?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to