HTML id attribute and arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

PHP converts x[a]=b parameter of the HTTP request as an array named x with its item named a set to value b. So, it seems possible to have the following (X)HTML code:
<input type="text" name="x[a]" id="x[a]" value="b" />
Unfortunatelly, HTML specification does not allow neither "[" nor "]" inside the id attribute. Specifically:
* Must begin with a letter A-Z or a-z
* Can be followed by: letters (A-Za-z), digits (0-9), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")
* Values are case-sensitive

How should I follow the HTML specification while having the passed parameters automatically converted to arrays in PHP?

Thank you for any tips,

Martin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux