getEntryText($authType, $request); $data = []; foreach ($response as $entry) { $data[] = $entry['Text'] . " (ID: " . $entry['ID'] . ")"; } echo json_encode($data); } catch (Exception $e) { echo json_encode([]); } ?>