I want to get desired multidimensional array as follows:
array (
array (abc => 'a', def => 1),
array (abc => 'b',def => 2)
)
But unable to get idea how to build its form. Help me on this guys.
I tried to build form as follows with expectation to get the above results.
<form method="POST" action="test.php">
<textarea name="test[][abc]"></textarea>
<input type="text" name="test[][def]">
<textarea name="test[][abc]"></textarea>
<input type="text" name="test[][def]">
// the 2nd set of textarea and input was dynamically generated by jQuery
<input type="submit">
</form>
Apologize if earlier questions not completed for you guys to understand.
UPDATED :
After certain modification on HTML I successfully get an array as follows:
Array
(
[scope] => Array
(
[0] => iusd
[1] => aishsadf
)
[qty] => Array
(
[0] => 723186
[1] => 324
)
)
How to access the value and pair it?