note 107900 added to function.str-split
| From: | ErickCarvalho | Date: | Tue, 13 Mar 2012 19:26:49 +0000 |
| Subject: | note 107900 added to function.str-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-186646@lists.php.net to get a copy of this message | ||
For php4 ;D
<?php
function str_split($string, $length = 1)
{
$return = array();
$count = 0;
for($i = 0; $i < strlen($string); $i++)
{
if($i % $length == 0)
{
$count++;
continue;
}
$return[$count] .= $string{$i};
}
return $return;
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 189.13.34.180
----
Manual Page -- http://www.php.net/manual/en/function.str-split.php
Edit -- https://master.php.net/note/edit/107900
Del: integrated -- https://master.php.net/note/delete/107900/integrated
Del: useless -- https://master.php.net/note/delete/107900/useless
Del: bad code -- https://master.php.net/note/delete/107900/bad+code
Del: spam -- https://master.php.net/note/delete/107900/spam
Del: non-english -- https://master.php.net/note/delete/107900/non-english
Del: in docs -- https://master.php.net/note/delete/107900/in+docs
Del: other reasons-- https://master.php.net/note/delete/107900
Reject -- https://master.php.net/note/reject/107900
Search -- https://master.php.net/manage/user-notes.php