title: Select Form Array Value Using JQuery
body: <p>I have a form that is being generated on the fly in PHP using the below (<code>$theFeatures</code> is a multidimensional array):</p>
  
  <pre><code>&lt;?php 
  foreach($theFeatures as $theKey =&gt; $theValues) {
  ?&gt;
      &lt;input type="text" value="&lt;?php echo $theValues['Key']; ?&gt;" name="theFeatures[&lt;?php echo $theKey; ?&gt;]['Key']" size="6" /&gt;
      &lt;input type="text" value="&lt;?php echo $theValues['Value']; ?&gt;" name="theFeatures[&lt;?php echo $theKey; ?&gt;]['Value']" /&gt; &lt;br /&gt;
  &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>This should create two input boxes that look like this:</p>
  
  <pre><code>&lt;input value="Type" name="theFeatures[4]['Key']" size="6" type="text" /&gt;
  &lt;input value="Bird Table" name="theFeatures[4]['Value']" type="text" /&gt;
  </code></pre>
  
  <p>How can I get the first part of the array ( <code>[4]</code> in the above example ) in jQuery so I can store that as a JavaScript variable and use it else where in my jQuery??</p>
  
  <p>Cheers,</p>
  
  <p>Andy</p>