Debug Berita Photo Structure"; // Get berita data $berita_result = api_get_berita($token); if ($berita_result['success']) { $berita_data = $berita_result['data']; $berita_items = $berita_data['data'] ?? $berita_data; echo "
";
print_r($berita_result);
echo "";
if (is_array($berita_items)) {
echo "";
print_r($item);
echo "";
// Check all possible photo fields
$photo_fields = ['photo', 'foto', 'image', 'gambar', 'img', 'thumbnail', 'preview'];
echo "$field: " . htmlspecialchars($value) . "
"; } // Check if there are any fields that might contain image data echo "$key: " . htmlspecialchars($value) . " (POSSIBLE IMAGE)
"; } else { echo "$key: " . htmlspecialchars(is_string($value) ? $value : gettype($value)) . "
"; } } echo "API call failed: " . ($berita_result['data']['pesan'] ?? 'Unknown error') . "
"; } echo "";