I have a form as shown below.

What I have done up to now is assign a checkbox for each item as follows.
<input type="checkbox" name="options[]" value="relevant_value" class="checks">
Now my issue is I can not figure out which the parent item and which is the child item. How can I solve this?
(Given I use Joomla. Get the checkboxes using below code)
$options = JRequest::getVar('options', NULL, 'post', 'array');
I’ll suggest to use multidimensional array.like this-
get data through-
see how data comes-
Now it’s two dimentional,use parent as the key for child to differentiate different parent.
let me know if it’s not clear.