|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11097 HTML Form Variable Error
Submitted: 2001-05-24 16:40 UTC Modified: 2001-05-24 17:00 UTC
From: brw at brw dot net Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.0.5 OS: Linux 2.4 kernel
Private report: No CVE-ID: None
 [2001-05-24 16:40 UTC] brw at brw dot net
After messing with some PHP functionality, I decided that I wanted an input field to be named like the following.


the HTML looks like this.

<input type="hidden" name="func[name]" value="blah()">

The unfortunate thing is that PHP treats the name func[name] as an array.  I.e., $func.

If this is supposed to act like this then ok, but I would guess this would not be a good idea.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-24 17:00 UTC]
No, this is quite intentional.

For example, if you wanted to use a <select multiple> list, name it "list[]", and all the options that get selected will go into the array.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 21 11:01:30 2024 UTC