Here is what I want to output:
Array
(
[0] => Array
(
[restriction_type_code] => CALORICONTROL
[restriction_detail_code] => 3000CAL
)
[1] => Array
(
[restriction_type_code] => GLUTENFREE
[restriction_detail_code] => NR
)
)
and my actual code looks like this:
foreach ($restriction as $value)
{
$itemSplit = explode("||", $value);
$itemSplit1 = explode("|", $itemSplit[0]);
$itemSplit2 = explode("|", $itemSplit[0]);
$arrOrderDiet['restriction_type_code'][] = $itemSplit1 //CALORICONTROL;
$arrOrderDiet['restriction_detail_code'][] = $itemSplit2//3000CAL;
}
Im trying all the possibilities but I think i ran out of solutions.

