[PHP] explode() - quick question

2002-03-13 Thread Phil Schwarzmann

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)

...it doesn't seem to work.  ANY HELP!?!?  THANKS!!



Re: [PHP] explode() - quick question

2002-03-13 Thread Analysis Solutions

On Wed, Mar 13, 2002 at 10:06:01PM -0500, Phil Schwarzmann wrote:
 
 $array[0] = 'h'
 $array[1] = 'e'
 
 $character = explode('', $string) or

You need to explode the array:

  $character = explode('', $array);

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] explode() - quick question

2002-03-13 Thread Martin Towell

just use $string{0} and $string{1} , etc.
note the type of brackets

-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 2:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] explode() - quick question


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)

...it doesn't seem to work.  ANY HELP!?!?  THANKS!!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php