Thanks for responding to my post, Markus.  I did try a search before I posted 
originally, but didn't find anything relevent.  However, on your advice I 
searched again, and found the thread you were talking about. 

  QUOTE [

No, its not 'how it should work'. Image when you write the following code in 
php: $interests = "something";
$interests = "new";
Would you expect this ending up with $interests being an array("something", 
"new"); ? \ Certainly not. So, for you to have an array, like Jani said, 
append '[]' and you have what you want. - Markus 

  ]

That is really a completely different situation though.  In my opinion, the 
most straightforward behavior would be for form elements with the same name 
(e.g. checkboxes and select menus) to automatically become PHP arrays in the 
script they are submitted to, without any special syntax.  I haven't looked 
into it enough to know if that's feasible.  If that is not feasible, then a 
different syntax for naming those elements must be created if developers are 
going to be able to use this feature with XHTML / XML.  Currently I use 
JavaScript to compile the values of checked or selected items with the same 
name into comma delimited strings which I pass in a hidden field and then 
explode with PHP.  It would be much better to be able to take advantage of 
this feature. 

In terms of it working fine with current ECMAScript implementations, of 
course that's true, but just because the implementation is broken, I'm not 
going to write broken, proprietary code.  Anyway, that would be missing the 
main point that it is not valid in the value of a name or id attribute.  
Unless the PHP development community plans to bury its collective head in the 
sand and pretend that XML doesn't exist, or that it's not important to write 
valid, interoperable code, it is going to have to address this problem, 
preferably sooner rather than later. 

Markus Fischer <[EMAIL PROTECTED]> wrote on 11/28/01 8:51:03 AM:
>
>Well .. there were discussion about this in the past or at
>    leat within some bug reports and it seems its likely to
>    getting changed really soon. Although ECMA doesn't allow it
>    it works fine aith all current (modern ;) implementations to
>    access identfieris with '[' or ']' in the name.
>
>    For more information you may wan't to search the archive at
>    http://marc.theaimsgroup.com/ .
>
>    - Markus


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to