I want to put my post array into array array. I have the following form (this form is inside a foreach loop) which will post array data like the following:
<input type="hidden" name="cl[]" value="">
<input type="hidden" name="cd[]" value="">
and the post array contains when viewed in firebug:
cl[] 4
cl[] 4
cd[] John
cd[] Shaw
and I want these value in one single like below:
$allData = array(
array(
'cl' => 4,
'cd' => 'John',
),
array(
'cl' => 4,
'cd' => 'Shaw',
)
);
Please help.