note 6069 deleted from function.str-replace by philip

From: Date: Mon, 04 Feb 2002 13:41:42 +0000
Subject: note 6069 deleted from function.str-replace by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-26231@lists.php.net to get a copy of this message
A way to remove multiple items without using str_replace("","",(str_replace"","", $var)): <?php $patterns = array("/B/", "/D/" ); $replacement = array("-", "="); print preg_replace($patterns, $replacement, "ABCDE"); ?> Hope that helps!

« previous php.notes (#26231) next »