$counters) { foreach ($counters as $counter => $types) { foreach ($types as $type => $data) { $array[$filter][$counter][$type] = 1; } } } echo("\n"); if (!safe_empty($array)) { // FIXME. Adama, this array is very big for attrib table set_entity_attrib('device', $device['device_id'], 'juniper-firewall-mib', str_compress(safe_json_encode($array))); } unset($fws, $filter, $counters, $counter, $data); // EOF