note 17964 deleted from function.str-replace by philip

From: Date: Mon, 04 Feb 2002 12:54:26 +0000
Subject: note 17964 deleted from function.str-replace by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-26222@lists.php.net to get a copy of this message
Let's say you have this: foobar<tag> <tag> foobar which you want to convert to this: foobar foobar Doing a str_replace('<tag>', '', $string) will result in: foobar foobar Not what you want. Doing a str_replace("<tag>\r\n", '', $string) will result in: foobarfoobar Again not what you want. Doing a str_replace("\r\n<tag>\r\n", "\r\n", $string) will do it: foobar foobar

« previous php.notes (#26222) next »