Re: Problem with Square Brackets [was: php+ ajax]
| From: | Jochem Maas | Date: | Tue, 21 Feb 2006 14:04:12 +0000 |
| Subject: | Re: Problem with Square Brackets [was: php+ ajax] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-230805@lists.php.net to get a copy of this message | ||
David Dorward wrote:
--- Jochem Maas <jochem@iamjochem.com> wrote:AHA! - I seem to have read the specvs incorrectly - the 'id' attribute is defined as 'W3C datatype' NAME whereas the 'name' attribute (atleast as far as the FORM, INPUT & SELECT tags are concerned) is of 'W3C datatype' CDATA. the CDATA type allow ssquare brackets ofcourse = which means the php choice of using the square brackets is AOK. :-) <SIDENOTE TO JAY> the 'when to break the rules' idea still stands in theory :-) </SIDENOTE TO JAY>From a php developer point of view there is one big problem with 'follow the standards' mantra as far as square brackets go (with regard to use in the value of name attributes of form fields) ...Nope. The names of form controls MAY contain square brackets, it is the ids that may not
(and the name and id attributes do NOT need to have the same value).that I know - I mentioned that myself in a previous post.