I'd like to make it so that I have the variables in the POST super global array arranged according to a structure that I define via fieldsets. The result that I would like to achieve would be one array per fieldset, like in the example below:
<fieldset id="fs1">
<input type="checkbox" name="cb1" value ="xy" />
<input type="checkbox" name="cb2" value ="xy" />
<input type="checkbox" name="cb3" value ="xy" />
</fieldset>
<fieldset id="fs2">
<input type="checkbox" name="cb4" value ="xy" />
<input type="checkbox" name="cb5" value ="xy" />
</fieldset>
I would like to get a POST array like this:
array
'fs1' => array
'cb1' => string 'xy' (length=2)
'cb2' => string 'xy' (length=2)
'cb3' => string 'xy' (length=2)
'fs2' => array
'cb4' => string 'xy' (length=2)
'cb5' => string 'xy' (length=2)
(currently this would result in a POST array like this:
array
'cb1' => string 'xy' (length=2)
'cb2' => string 'xy' (length=2)
'cb3' => string 'xy' (length=2)
'cb4' => string 'xy' (length=2)
'cb5' => string 'xy' (length=2)
)
any way of getting to the first structured array? if fieldsets are not the way to achieve it...any other way?
ty
Bjom