note 73523 deleted from function.explode by tularis

From: Date: Mon, 27 Oct 2008 13:07:08 +0000
Subject: note 73523 deleted from function.explode by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-145827@lists.php.net to get a copy of this message
Note Submitter: Nicoxinchao ---- insensitive case explode function: <?php function iExplode($Delimiter, $String, $Limit = '') { $Explode = array(); $LastIni = 0; $Count = 1; if (is_numeric($Limit) == false) $Limit = ''; while ( false !== ( $Ini = stripos($String, $Delimiter, $LastIni) ) && ($Count < $Limit || $Limit == '')) { $Explode[] = substr($String, $LastIni, $Ini-$LastIni); $LastIni = $Ini+strlen($Delimiter); $Count++; } $Explode[] = substr($String, $LastIni); return $Explode; } ?>

« previous php.notes (#145827) next »