note 17081 deleted from function.explode by jimw

From: Date: Fri, 07 Dec 2001 21:25:59 +0000
Subject: note 17081 deleted from function.explode by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22017@lists.php.net to get a copy of this message
Multiple tokens making explode behave in undesirable ways? Try the following code: function tc_explode ($token, $string) { ....$regex = preg_quote ($token); ....$string = preg_replace("/$regex+/", $token, $string); ....return explode($token, $string); } Note: .'s added for indenting - remove before use! :)

« previous php.notes (#22017) next »