> Im trying to take this string, "hello", and explode it into an array
> with each cell in the array containing one character.
> $array[0] = 'h'
> $array[1] = 'e'
> etc..
> How does this work?  When is use...
> $character = explode('', $string) or....
> $character = explode($string)
> doesn't seem to work.  ANY HELP!?!?  THANKS!!

You don't need to do that if you just want to reference a particular 
position in the string. Each character in a string variable can be 
referenced as though the variable is an array of characters. Try:

$mystring = "hello";
echo $mystring[0]; // outputs h
echo $mystring[4]; outputs o

David Robley
Temporary Kiwi!

Quod subigo farinam

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to