note 106852 deleted from function.str-split by tularis

From: Date: Tue, 13 Dec 2011 22:00:41 +0000
Subject: note 106852 deleted from function.str-split by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185067@lists.php.net to get a copy of this message
Note Submitter: immatyger at gmail dot com ---- My version of this function for pre-php5. Works exactly the same as the php5 implementation. <?php if(!function_exists('str_split')) { function str_split($string, $split_length = 1) { if($split_length < 1) return false; for($i = 0; $i < strlen($string); $i += $split_length) { $part[] = substr($string, $i, $split_length); } return $part; } } ?>

« previous php.notes (#185067) next »