Dynamic multidimensional post form
<p>I have a form with a variable number of inputs. The inputs are inside the table and I need to get three values from them: the row, the column and the actual value inside the input. </p>

<p>Some may be populated some may not and I need all their values to update a mysql db (row and column to know what to update, value to know the new value to insert in the database).</p>

<p>This is my form (an example version of it):</p>

<pre><code>&lt;form method="post" action=""&gt;
      &lt;input name="data[111][222]" value="2" /&gt;
      &lt;input name="data[112][221]" value="0" /&gt;
      &lt;input name="data[113][223]" value="4" /&gt;
      //goes on
      &lt;input name="data[324][435]" value="11" /&gt;
      &lt;input name="data[325][436]" value="" /&gt;
&lt;/form&gt;
</code></pre>

<p>And that's as far as I go. How can I get the data from this form so I can do a simple update in my database that goes like this (for all the affected inputs):</p>

<pre><code>   update table set res="value_from_input" where row="row_value" and col="col_value"
</code></pre>
