Kashioclals
New Member
I have a form that is being generated on the fly in PHP using the below (\[code\]$theFeatures\[/code\] is a multidimensional array):\[code\]<?php foreach($theFeatures as $theKey => $theValues) {?> <input type="text" value="http://stackoverflow.com/questions/2073330/<?php echo $theValues['Key']; ?>" name="theFeatures[<?php echo $theKey; ?>]['Key']" size="6" /> <input type="text" value="http://stackoverflow.com/questions/2073330/<?php echo $theValues['Value']; ?>" name="theFeatures[<?php echo $theKey; ?>]['Value']" /> <br /><?php}?>\[/code\]This should create two input boxes that look like this:\[code\]<input value="http://stackoverflow.com/questions/2073330/Type" name="theFeatures[4]['Key']" size="6" type="text" /><input value="http://stackoverflow.com/questions/2073330/Bird Table" name="theFeatures[4]['Value']" type="text" />\[/code\]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??Cheers,Andy