[PHP] Re: Extract a string from a string

2002-01-03 Thread qartis
Thank you very much! -- 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]

[PHP] Re: Extract a string from a string

2002-01-02 Thread Joe Webster
$find = "hi"; $contents = implode(null, file($logfile)); $contents = preg_replace("/($find)/i", "\\1", $contents); echo $contents; that will replace any $find with your highlighted b. Notice the i at the end preg expression, that tells it to ignore case. The nice part about that is that if you se