Debug Detail Info"; echo "
ID yang dicari: " . htmlspecialchars($berita_id) . "
"; // Get berita data $berita_result = api_get_berita($token); echo ""; print_r($berita_result); echo ""; if ($berita_result['success']) { $berita_data = $berita_result['data']; echo "
";
print_r($berita_data);
echo "";
// Check structure
$berita_items = $berita_data['data'] ?? $berita_data;
echo "";
print_r($berita_items);
echo "";
if (is_array($berita_items)) {
echo "Index $index: ID = '$item_id', Judul = '$item_judul'
"; } // Try to find the specific 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 "";