Re: string into array
| From: | Philip Olson | Date: | Thu, 27 Sep 2001 23:28:51 +0000 |
| Subject: | Re: string into array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69071@lists.php.net to get a copy of this message | ||
A few replies already stated an answer, this information can be found :
http://www.php.net/manual/en/language.types.string.php
It's worth pointing out that :
$str = 'abc';
print $str[0]; // a
print $str{1}; // b
Do the exact same thing. But, the use of [] here is deprecated so someday
it might not work. [] was implemented in php3, {} in php4.
Regards,
Philip Olson
On Wed, 26 Sep 2001, randy wrote:
> I need to take a string and read it into an array character by character
> here is an example
>
>
>
> $str="this is a string";
>
> so if I printed $array[0] would be = t
>
> can somebody help?
>
> Thankyou.
>
> Randy
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>