Debug Detail Info"; echo "

ID yang dicari: " . htmlspecialchars($berita_id) . "

"; // Get berita data $berita_result = api_get_berita($token); echo "

API Response:

"; echo "
";
print_r($berita_result);
echo "
"; if ($berita_result['success']) { $berita_data = $berita_result['data']; echo "

Berita Data:

"; echo "
";
    print_r($berita_data);
    echo "
"; // Check structure $berita_items = $berita_data['data'] ?? $berita_data; echo "

Berita Items (extracted):

"; echo "
";
    print_r($berita_items);
    echo "
"; if (is_array($berita_items)) { echo "

Available IDs:

"; foreach ($berita_items as $index => $item) { $item_id = $item['id'] ?? 'NO_ID'; $item_judul = $item['judul'] ?? 'NO_TITLE'; echo "

Index $index: ID = '$item_id', Judul = '$item_judul'

"; } // Try to find the specific ID echo "

Searching for ID: '$berita_id'

"; $found = false; foreach ($berita_items as $item) { if (($item['id'] ?? '') == $berita_id) { echo "

FOUND! Item details:

"; echo "
";
                print_r($item);
                echo "
"; $found = true; break; } } if (!$found) { echo "

ID '$berita_id' NOT FOUND in the data!

"; } } } else { echo "

API call failed: " . ($berita_result['data']['pesan'] ?? 'Unknown error') . "

"; } echo "

← Kembali ke Detail Info

";