note 58647 deleted from function.str-split by aidan
| From: | aidan@php.net | Date: | Sat, 04 Feb 2006 07:13:48 +0000 |
| Subject: | note 58647 deleted from function.str-split by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102959@lists.php.net to get a copy of this message | ||
Note Submitter: neos2k at gmx dot net
----
Note that Ludvig Ericson's code:
<?php
if (!function_exists('str_split')) {
function str_split($string, $split_length = 1) {
return explode("\r\n", chunk_split($string, $split_length));
}
}
?>
...will return an empty item at the end of the array, which can be confusing (i.e. when using
foreach).