Re: [PHP4BETA] please consider this functionality in v4
| From: | Teodor Cimpoesu | Date: | Wed, 16 Feb 2000 15:48:35 +0000 |
| Subject: | Re: [PHP4BETA] please consider this functionality in v4 | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10359@lists.php.net to get a copy of this message | ||
> Dusty Kline wrote:
>
> Hello:
> I'm sorry if this is inappropriate for this list, but those of you
> writing php are the people who could answer this question, so I
> thought this would be the right place. (perhaps more appropriate would
> be a php "wishlist", but I am unaware of any such thing)
>
> It would be an excellent feature of PHP to dynamically change GPC
> variables to arrays, if more than one variable (from the same
> operation) exists. For instance, if I did a GET operation like:
>
> "server/myfile.php?sanity=fading&foo=bar&sanity=gone",
> php currently would have only the following true:
> $foo=='bar'
> and
> $sanity=='gone'
>
> It would be fantastic if there was a feature, which could
> be enabled/disabled in the config file, so that php would make all of
> the following true:
> $foo=='bar'
> $sanity[0]='fading'
> $sanity[1]='gone'
You can make that happen if you rename your sanity variable to
`sanity[]'
in your forms/queries. This is a language feature documented in the
manual.
Also see the extremely nice&interesting new functions on arrays,
especially compact()/extract() which may help.
--
CIMPOESU Teodor, Web Programmer
@ DIGICOM S.A. Bucharest, Romania
@ Internet, site development
@ teo@digiro.net , +(401)-330.47.28
official home page ~ http://www.digiro.net/
Internet web page ~ http://internet.digiro.net/