note 7673 added to split

From: Date: Fri, 11 Aug 2000 04:45:52 +0000
Subject: note 7673 added to split
Groups: php.notes 
Request: Send a blank email to php-notes+get-1014@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.. http://www.php.net/manual/function.split.php

« previous php.notes (#1014) next »