Possible Duplicate:
multi-dimensional array post from form
I would like to send some data from the client to the PHP server using jQuery $.post()
. When it arrives at the server, I would like $_POST['myList']
to be equal to either of the following (what ever is easiest). What should I set the data object to within $.post()
?
array (
0=>array('id'=>123,'d1'=>'aaa','d2'=>'xxx'),
1=>array('id'=>234,'d1'=>'bbb','d2'=>'yyy'),
2=>array('id'=>345,'d1'=>'ccc','d2'=>'zzz')
)
array (
123=>array('d1'=>'aaa','d2'=>'xxx'),
234=>array('d1'=>'bbb','d2'=>'yyy'),
345=>array('d1'=>'ccc','d2'=>'zzz')
)