note 55991 deleted from function.str-split by aidan
| From: | aidan@php.net | Date: | Sat, 04 Feb 2006 07:14:30 +0000 |
| Subject: | note 55991 deleted from function.str-split by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102964@lists.php.net to get a copy of this message | ||
Note Submitter: 1413 at blargh dot com
----
If you just need to split strings, and not depend on any other side effects or the like, I have the
following in my standard functions file that I use for both PHP4 and PHP5 projects:
if(!function_exists('str_split'))
{
function str_split($str, $len = 1)
{
return(explode("\1\2\3",chunk_split($str, $len, "\1\2\3")));
}
}