note 49394 deleted from function.str-split by aidan

From: Date: Mon, 31 Jan 2005 07:23:55 +0000
Subject: note 49394 deleted from function.str-split by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84265@lists.php.net to get a copy of this message
Note Submitter: mattyblah at gmail dot com ---- To use this functionality in prior versions of PHP, use the following: function str_split($text, $c) { $len = strlen($text); $a = 0; while($a < $len) { if ($a + $c > $len) { $c = $len - $a; } $arr[] = substr($text, $a, $c); $a += $c; } return $arr; }

« previous php.notes (#84265) next »