PHP Form Handling

I need to handle an undefined number of fields. I have something like this.


How can I use $_POST like an array ?


I use jQuery, with .serialize, not $_Get;

This expression


represent the post parameters from firebug console, for better understanding.
The html is something like this.The number of input fields are
undefined, that means I don’t know how many input field elements will be sent.
Their are dynamically created by some variables and configurations.

<input class="text" style="width: 98&#37;" type="text" name="edit_1" value="title fanSERREFDFDAKLLLTGHGH" id="edit_1"/>
<input class="text" style="width: 98%" type="text" name="edit_5" value="title FDAKLLLTGHGH" id="edit_1"/>

I need, the id of the field, for example edit_1 and his corresponding value from edit_1=title+fanSERREFDFDAKLLLTGHGH, to make some database operations.

I also try to use .serializeArray from jquery library, to send data as JSON, but in the console for post parameters I see

data	[object Object]
data	[object Object]
data	[object Object]
data	[object Object]

so I can’t identify correctly the json data form, so I can parse in php.

You get parameters in the URL, which are send to the $_GET variable, but you want an array in $_POST ?

Let’s assume you meant $_GET.

When you format an url like


The $_GET looks like

  'edit' => array(
     1 => array(
       'name' => 'ScallioXTX',
       'country' => 'NL',

Does that help?

I also think you should just serialize the array.