note 43687 added to function.str-split
| From: | sleek at rn2 dot php dot net | Date: | Wed, 30 Jun 2004 09:59:17 +0000 |
| Subject: | note 43687 added to function.str-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72164@lists.php.net to get a copy of this message | ||
For PHP4, this function can be used:
function str_split($string, $split_length = 1) {
$strlen = strlen($string);
for ($i = 0; $i < $strlen; $i += $split_length) {
$array[] = substr($string, $i, $split_length);
}
return $array;
}
----
Manual Page -- http://www.php.net/manual/en/function.str-split.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43687
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43687&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43687&report=yes
Search -- http://master.php.net/manage/user-notes.php