Reply to Re: $_POST + spaces and dots in keys

Your name:

Reply:


Posted by Justin Koivisto on 12/10/05 01:00

Sergei Riaguzov wrote:
> On Fri, 09 Dec 2005 16:39:25 -0600, Justin Koivisto wrote:
>
>
>>See the "cannot use "-" in variable names?" thread...
>
> What have variable names to keys of array?!
>
>
> $array["w t f"] = ...
> print_r($array);
>
> works nicely.
>
> But try the example in the first post.

PHP does allow free-form strings for array indicies, so that's perfectly
legal. I've never tried it (or heard anything to suggest otherwise), but
in theory, you could probably even use tabs, new lines, carriage
returns, etc. in the array index.

I'm wondering if it isn't PHP that does the conversion at all, but maybe
the web server software... I know when I first noticed that "-"
characters were being replaced I was using apache 1.3 (win & lin) with
php 4.x, but now I am using apache 2 (and php5), but I don't recall ever
finding documentation about this replacement stuff for either software.

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

[Back to original 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

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