php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11518 two dimensional array in POST doesn't work
Submitted: 2001-06-17 07:35 UTC Modified: 2001-06-19 00:34 UTC
From: jaco dot rietveld at ision dot nl Assigned:
Status: Closed Package: Arrays related
PHP Version: 3.0.14 OS: RH 6.4
Private report: No CVE-ID: None
 [2001-06-17 07:35 UTC] jaco dot rietveld at ision dot nl
I would like to use two dimensional array's in my html forms, so $array["id1"]["id2"] becomes available in my script.

A 1 dimensional array with named entries works fine : include <INPUT type=text name=array[id1]> in your html form and you get it's value in $array["id"] when form is POSTed.

Next I tried putting <INPUT type=text name=array[id1][id2]> in the form. Now you don't get the value in $array["id1"]["id2"] but instead the POSTed value is put in $array["id1][id2"] - the array stays 1 dimensional witk key "id1][id2".

Maybe I am trying to abuse something here which might not even be efficient to do, but for my app this feature would simplify things a little.

regards,

Jaco Rietveld




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-19 00:34 UTC] rasmus@php.net
Upgrade to PHP 4 where this is supported.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC