Hi all, I'm new to PHP and just getting my hands dirty with it. I was wondering if you can it is possible with a function in PHP to parse a set GET or POST variables of the same name. For example if you have the URL:
http://www.website.com/webpage.php?colu ... umn3=data9
So as you can see above we have distinct rows and columns in a POST/GET, however, can they be retrieved easily as rows and columns? At present I'm under the pressure the $_GET['column1'] refers only to the first (or is it the last?) instance? Am I correct in thinking this? Is there a way all the data could be parsed into an array.
Or is there just a better way in general of passing tabular information using PHP from an input screen?
Passing GET and POST
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Passing GET and POST
You may want to use the syntax to tell PHP to use arrays:
Code: Select all
<input type="text" name="column1[1]"/>
<input type="text" name="column1[2]"/>
<input type="text" name="column2[1]"/>
<input type="text" name="column2[2]"/>(#10850)