Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($db->query($q)->fetchAll(PDO::FETCH_ASSOC) as $item) {
- $global_type = $item['global_type'];
- $object_type = $item['object_type'];
- $group_id = $item['group_id'];
- $group_name = $item['group_name'];
- $type_name = $item['type_name'];
- $type_names[$global_type]['items'][$object_type]['id'] = $object_type;
- $type_names[$global_type]['items'][$object_type]['name'] = $type_name;
- $type_names[$global_type]['items'][$object_type]['items'][$group_id]['id'] = $group_id;
- $type_names[$global_type]['items'][$object_type]['items'][$group_id]['name'] = $group_name;
- $type_names[$global_type]['items'][$object_type]['items'][$group_id]['items'][] = [
- 'attr_name' => $item['attr_name'],
- 'label' => $item['label'],
- ];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement