note 106852 added to function.str-split
| From: | immatyger at gmail dot com | Date: | Mon, 12 Dec 2011 16:13:08 +0000 |
| Subject: | note 106852 added to function.str-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185060@lists.php.net to get a copy of this message | ||
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;
}
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 174.138.201.122
----
Manual Page -- http://www.php.net/manual/en/function.str-split.php
Edit -- https://master.php.net/note/edit/106852
Del: integrated -- https://master.php.net/note/delete/106852/integrated
Del: useless -- https://master.php.net/note/delete/106852/useless
Del: bad code -- https://master.php.net/note/delete/106852/bad+code
Del: spam -- https://master.php.net/note/delete/106852/spam
Del: non-english -- https://master.php.net/note/delete/106852/non-english
Del: in docs -- https://master.php.net/note/delete/106852/in+docs
Del: other reasons-- https://master.php.net/note/delete/106852
Reject -- https://master.php.net/note/reject/106852
Search -- https://master.php.net/manage/user-notes.php