note 109343 deleted from function.explode by googleguy

From: Date: Thu, 22 Nov 2012 16:50:33 +0000
Subject: note 109343 deleted from function.explode by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-192089@lists.php.net to get a copy of this message
Note Submitter: php dot net at pravec dot de ---- there is a difference how active server pages (vbs/asp) handle array. an empty string will return nothing after split. while translating asp to php ... take this: <?php $a = explode("\\r\\n", ""); print(count($a)); $b = ms_explode("\\r\\n", ""); print(count($b)); function ms_explode($delimiter, $string, $limit = 0xFFFFFFFF) { return($string ? explode($delimiter, $string, $limit) : array()); } ?>

« previous php.notes (#192089) next »