I have a form that I want to pass to PHP as an array. Simple enough, but I'd like the array to be:
Array ( [0] => Array ( 'name' => a 'email' => b ) [1] => Array ( 'name' => c 'email' => d ) [2] => etc ...)
Currently my form is:
<form action="" method="post" name="record[]">
<input type="text" name="record[0][name]"><input type="text" name="record[0][email]"><br>
<input type="text" name="record[1][name]"><input type="text" name="record[1][email]"><br>
<input type="button" class="button" value="submit">
</form>
but that passes 'name' and 'email' as [name],[email] which doesn't display the results that I'm looking for when I do a foreach().
Ultimately, I want to cycle through each record using PHP and echo:
name: a
email: b
name: c
email: d
Suggestions?
Thanks in advance.