Posted by gosha bine on 05/17/07 20:38
Mike P2 wrote:
> I used to use arrays in input data that will be turned into a
> superglobal more often, but now that I care more about xHTML validity,
> I don't. Validation checking websites (particularly the W3C validator)
> yell at me for having square brackets in a name or id attribute.
Actually, [] in a "name" (not in "id") is valid. Can you post an example
of non-validating code?
> I started going the simple way of just separating what would be the
> array name from what would be the subscript with an underscore and
> parsing that out with PHP later. Is there a better, valid way of doing
> this that will have PHP set up my multidimensional superglobals for me
> as it would with the square brackets?
>
> -Mike PII
>
I'm afraid there is no way to achieve the same _automatically_.
--
gosha bine
extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
[Back to original message]
|