note 84213 deleted from function.str-split by danbrown

From: Date: Mon, 04 Aug 2008 15:22:58 +0000
Subject: note 84213 deleted from function.str-split by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143134@lists.php.net to get a copy of this message
Note Submitter: tatsudoshi ---- I just thought I would post my version of str_split() for users of php4 <?php function str_split($string,$string_length=1) { if($string >= 1) { do { $c = strlen($string); $parts[] = substr($string,0,$string_length); $string = substr($string,$string_length); } while($string !== false); } else { $parts = false; } return $parts; } ?> It was designed to work the same as the php5 version to make it easy to move to php5 when the time comes

« previous php.notes (#143134) next »