$subdata) { foreach ($subdata as $field => $value) { $update_array[$field] = $value; } } DbFunction::secureUpdate($table, $update_array, "id = $id"); } }