You are here: Re: beginning of a string « PHP Language « IT news, forums, messages
Re: beginning of a string

Posted by Charlie King on 11/21/05 11:37

On Mon, 16 Jan 2006 00:26:34 -0800, in
<BbudnXquaNggxVbenZ2dnUVZ_sidnZ2d@comcast.com> (alt.comp.lang.php)
"Jim Michaels" <jmichae3@yahoo.com> wrote:

> "Charlie King" <charlie@removethisitsaspamtrap.stopthatitssilly.com> wrote
> in message news:2qdhs1l83afgqk9t5qnfhiffqt97oic9sd@4ax.com...
> > On Sat, 07 Jan 2006 17:05:49 -0500, in
> > <%WWvf.23054$%h2.16196@fe18.usenetserver.com> (alt.comp.lang.php)
> > David Haynes <david.haynes2@sympatico.ca> wrote:
> >
> >
> >> or
> >> <?php
> >> $s = "K123456";
> >>
> >> switch( $s[0] ) {

<snip>

> I thought the syntax for PHP to access a string 's chars was $s{0} in the
> manual.
> does [0] really work in practice?

You are right but, on my server at least, both syntaxes work.
--
Charlie

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация