note 7673 deleted from split by torben
| From: | torben@php.net | Date: | Sun, 10 Sep 2000 21:54:36 +0000 |
| Subject: | note 7673 deleted from split by torben | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4674@lists.php.net to get a copy of this message | ||
Hiya,
For those who are trying to do:
$array = split('', $var);
and are getting errors, there is a way around it. Use the code below are it'll do the above.
$array = array(); //set array
for ($i=0; $i<strlen($var);$i++) //run though each char in array, one at a time
{ array_push($array, $var[$i]); } //push onto the end of the array
Jonathan Wright..