$device['device_id'], 'app_type' => $app), 'applications'); } } if ($updated) { print_message("Applications updated!"); } else { print_message("No changes."); } } } # Show list of apps with checkboxes $apps_enabled = dbFetchRows("SELECT * from `applications` WHERE `device_id` = ? ORDER BY app_type", array($device['device_id'])); if (safe_count($apps_enabled)) { foreach ($apps_enabled as $application) { $app_enabled[] = $application['app_type']; } ?>