Re: string to array

From: Date: Fri, 08 Nov 2002 13:43:30 +0000
Subject: Re: string to array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-123374@lists.php.net to get a copy of this message
"Erwin" <erwin@isiz.com> wrote... : > > A string is already an array of chars > > > > $string = 'string'; > > echo $string[0]; // will echo 's' > > True, but that's different than the array type. Sometimes you'll just need > an array instead of a string. > > Try using > > $string = explode( '', 'string' ); I think this will fail. There is a function just for that, don't remember right now what it was. -- Maxim Maletsky maxim@php.net

« previous php.general (#123374) next »