note 33878 deleted from function.str-split by aidan

From: Date: Tue, 01 Jun 2004 06:18:29 +0000
Subject: note 33878 deleted from function.str-split by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-70390@lists.php.net to get a copy of this message
Note Submitter: k@skreel.org ---- str_split for older versions of PHP, it should behave just the same (let's hope that code indentation remains the same ^^). function str_split($chaine, $length=1) { $retour= FALSE; $incrmt= (int)$length; if (0 < $incrmt) { $retour= array(); $offset= 0; $limite= strlen($chaine); while ($offset < $limite) { $retour[]= substr($chaine, $offset, $incrmt); $offset += $incrmt; } }// if (0 < $incrmt) return ($retour); }

« previous php.notes (#70390) next »