<?php $data = [ 0 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF1' ], 1 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF900' ], 2 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G1', 'filters_label' => 'FF324234' ], 3 => [ 'regulations_label' => 'Europe', 'groups_label' => 'G2', 'filters_label' => 'FF23942' ], 4 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF3242' ], 5 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF78978' ], 6 => [ 'regulations_label' => 'America', 'groups_label' => 'G29', 'filters_label' => 'FF48395043' ], 7 => [ 'regulations_label' => 'Asia', 'groups_label' => 'G2000', 'filters_label' => 'FF7' ] ]; foreach ($data as $key => $d) { if ($key > 0) { if ($data[$key-1]['regulations_label'] !== $d['regulations_label']) { echo $d['regulations_label'] . "\n"; } if ($data[$key-1]['groups_label'] !== $d['groups_label']) { echo "-" . $d['groups_label'] . "\n"; } } else { echo $d['regulations_label'] . "\n"; echo "-" . $d['groups_label'] . "\n"; } echo ' -- ' . $d['filters_label'] . "\n"; }
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`