Search through the docs/archive and can't figure this one out. Surely I'm overlooking something obvious.
I can't figure out how to escape a literal "/" in $q. Adding the line: $q=str_replace("/", "\/", $q); yields a literal "\/" in $content. $q_upper=strtoupper($q); $q_lower=strtolower($q); $q_ucfirst=ucfirst($q); $patterns[0] = "/$q/"; $patterns[1] = "/$q_upper/"; $patterns[2] = "/$q_lower/"; $patterns[3] = "/$q_ucfirst/"; $content = preg_replace($patterns, $replacements, $content); Thanks in advance, sincerely! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php