note 25067 added to function.substr
| From: | pgermain2 at wanadoo dot fr | Date: | Mon, 09 Sep 2002 22:09:33 +0000 |
| Subject: | note 25067 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36408@lists.php.net to get a copy of this message | ||
Returns an array of sub-strings which have the same length :
function strcut($string, $length) {
for ($i = 0; $i < strlen($string); $i += $length) {
$array[] = substr($string, $i, $length);
}
return $array;
}
--
http://www.php.net/manual/en/function.substr.php
http://master.php.net/manage/user-notes.php?action=edit+25067
http://master.php.net/manage/user-notes.php?action=delete+25067
http://master.php.net/manage/user-notes.php?action=reject+25067