note 49648 deleted from function.str-split by aidan
| From: | aidan@php.net | Date: | Mon, 14 Feb 2005 05:12:17 +0000 |
| Subject: | note 49648 deleted from function.str-split by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84985@lists.php.net to get a copy of this message | ||
Note Submitter: Gregor Mosheh
----
// here is a str_split() implementations for older versions,
// that supports the optional length argument
function str_split($string,$length=1){
$parts = array();
while ($string) {
array_push($parts, substr($string,0,$length) );
$string = substr($string,$length);
}
return $parts;
}