Fw: [PHP] Convert a string to an array

From: Date: Wed, 23 Oct 2002 15:19:20 +0000
Subject: Fw: [PHP] Convert a string to an array
Groups: php.general 
Request: Send a blank email to php-general+get-121114@lists.php.net to get a copy of this message
where is $z set??? ----- Original Message ----- From: "WANDA HANSEN" <scriptsjoint@earthlink.net> To: <> Sent: Wednesday, October 23, 2002 9:38 AM Subject: [PHP] Convert a string to an array 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#121114) next »