Lets say I have an array like:
Array
(
[1] => Array
(
[name] => 85 x 55mm
[options] => Array
(
[2] => Array
(
[2] => Ivory Board
[3] => Silk Board
)
[6] => Array
(
[4] => 330gsm
[5] => 400gsm
)
)
)
)
The inner options could have x number of values. In this example I want a select list that will chain the option ids from the root parent key (could be more than 1 parent but only 1 in this case) and the values excluding the parent name i.e
<h1>85 x 55mm</h1>
<select name="1">
<option value="1,2,4">Ivory Board, 330gsm</option>
<option value="1,3,5">Silk Board, 400gsm</option>
</select>
Tried re-keying the arrays but struggling to combine.