You are here: Re: Cannot use "-" in variable names? « PHP Programming Language « IT news, forums, messages
Re: Cannot use "-" in variable names?

Posted by Chung Leong on 12/10/05 03:44

Justin Koivisto wrote:
> Chung Leong wrote:
> > Malcolm Dew-Jones wrote:
> >
> >>Justin Koivisto (justin@koivi.com) wrote:
> >>
> >>: Kim André Akerø wrote:
> >>: >
> >>: > You can safely use "_" (underscore) instead. If you need to use it in a
> >>: > query string or form field, use $_POST, $_GET or $_REQUEST.
> >>
> >>: - characters in those arrays are replaced by _ automagically...
> >>
> >>There must be a config setting to do that, cause I have never observed
> >>that behaviour. The following uses - in the html parameter names.
> >
> >
> > I would have sworn to god that that's how it work, at least in the case
> > of register_globals = 1 and extract(). Yet that's not the behavior when
> > I tried. Dashes remain dashes in $_GET and the variable isn't set.
> > Weird...
>
> Good, I'm not completely loosing it them... ;)
>
> --
> Justin Koivisto, ZCE - justin@koivi.com
> http://koivi.com

Aha, now I remember! It's the period/fullstop that gets automatically
replaced by an underscore, not the dash.

 

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

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