Convert a string to an array
| From: | WANDA HANSEN | Date: | Wed, 23 Oct 2002 14:38:11 +0000 |
| Subject: | Convert a string to an array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-121104@lists.php.net to get a copy of this message | ||
Hello,
I am having trouble converting a string to an array.
I have been trying the following:
$len = strlen($word);
for($count=0;$count<$len;$count++)
{
$w[$z] = $word{$z};
}
It appears to create an array, but when I try and shuffle it
$w=shuffle($w);
I get the following error:
Warning: Cannot use a scalar value as an array in
/home/taylor94/public_html/jumble/stringshuffle.php on line 68
Any help would be appreciated.
Thanks,
Wanda