note 27612 deleted from function.implode by sniper
| From: | sniper@php.net | Date: | Wed, 08 Oct 2003 03:53:44 +0000 |
| Subject: | note 27612 deleted from function.implode by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57989@lists.php.net to get a copy of this message | ||
Note Submitter: destes at ix.netcom.com
----
The preceding user believes it is improper to use [] to denote variable names in HTML forms. While
it is perhaps technically against the rules of the HTML spec (and the names should definitely be
enclosed in quotes), it is necessary to do so. If you want the results of a series of checkboxes or
a <select multiple> to be put into an array when the form-handling page loads, its name needs
to have a [] on the end of it. This gives PHP the necessary hint that you're expecting it to
be an array. I know of no other way to give that information to PHP. For more information, go
here:
(combine the two rows of text to get the full URL)
http://www.php.net/manual/en/language.types.array.php
#language.types.array.syntax.modifying