Re: string to array??
| From: | Neil Freeman | Date: | Thu, 17 Jan 2002 12:41:26 +0000 |
| Subject: | Re: string to array?? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80906@lists.php.net to get a copy of this message | ||
You just have to remember that a string is simply a character array :)
Nick Wilson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> * On 17-01-02 at 12:57
> * Steve Edberg said....
>
> > Actually, you can treat a string as an array without any further
> > processing:
> >
> > $Globbot = 'dribcot';
> > echo $Globbot[0]; # echoes 'd'
> > echo $Globbot[6]; # echoes 't'
> >
> > Check out 'String access by character' about halfway down the page at
> >
> >
> > http://www.php.net/manual/en/language.types.string.php
> >
> > (or, in Portuguese,
> >
> >
> > http://www.php.net/manual/pt_BR/language.types.string.php
> >
> >
>
> Hmmm..... I didn't know that!
>
> > Actually, using the [] syntax is deprecated - using {} is the new way
> > - but I'm a creature of habit...
> >
>
> Or that!
>
> - --
>
> Nick Wilson
>
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8Rrz+HpvrrTa6L5oRAn4kAKCx41//DDBp/bPzPprs2Zls0xjGJgCgk5tz
> x16a8iDFuzEmsgSg5Iv/8Ms=
> =smoj
> -----END PGP SIGNATURE-----
>
> --
> 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
>
> ***************************************************************
> This message was virus checked with: SAVI 3.52
> last updated 8th January 2002
> ***************************************************************
--
--------------------------------
Email: neil.freeman@asa.co.uk
neil_freeman@yahoo.com
--------------------------------