php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #10842 FAQ section 8.1 should mention <input name="array[key]"> syntax
Submitted: 2001-05-13 22:11 UTC Modified: 2001-11-21 23:16 UTC
From: tim at xi dot co dot nz Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.5 OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tim at xi dot co dot nz
New email:
PHP Version: OS:

 

 [2001-05-13 22:11 UTC] tim at xi dot co dot nz
Section 8.1 of the FAQ linked from php.net talks about 
using HTML forms to create arrays in PHP. It describes
the <input name="array[]"> syntax, but specifically 
mentions that you can't use array keys - which is wrong,
I'm not sure which version this was added in, but
you can happily do

<input name="array[key1]" ... >
<input name="array[key2]" ... > 

and use $array in your target script.

I find this terribly useful, so I thought it should be in 
the FAQ.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-21 23:16 UTC] philip@php.net
Was added: 31st October 2001
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 05 18:01:29 2025 UTC