note 55991 added to function.str-split

From: Date: Fri, 19 Aug 2005 22:06:12 +0000
Subject: note 55991 added to function.str-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-93929@lists.php.net to get a copy of this message
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"))); } } ---- Manual Page -- http://www.php.net/manual/en/function.str-split.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55991 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55991&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55991&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55991&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55991&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55991&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55991&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55991&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93929) next »