On 13/03/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> "foo=a&foo=b&foo=c" becomes { foo:['a', 'b', 'c'] }. Rails (PHP too, I
> think) would preserve only the first value. Ruby preserves all.

In PHP, this would end up as

array(1) { ["foo"]=>  string(1) "c" }

$_GET is an array of 1 element with an index of 'foo' with a value of 'c'.

> "foo[]=a&foo[]=b&foo[]=c" becomes { 'foo[]':['a', 'b', 'c'] }. Rails and PHP
> would now preserve all values, but remove the square brackets from the key.

In PHP, this would end up as

array(1) { ["foo"]=>  array(3) { [0]=>  string(1) "a" [1]=>  string(1)
"b" [2]=>  string(1) "c" } }

$_GET is an array of 1 element with an index of 'foo' which is an
array of 3 elements, 'a', 'b' and 'c'.

If you have PHP, use this as showget.php

<?php var_dump($_GET); ?>



-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to