I am trying to make my code accept multiple choices from a set of filters, this is the result I have come to so far through the checkboxes and getting the elements selected.
$grouped = array(); foreach ($input as $choice => $group) { $grouped[$group][] = $choice; } var_dump($grouped);