$ArtistEvents = LastFM::get_artist_events($ArtistID, $Name);
$Debug->log_var($ArtistEvents);
if ($ArtistEvents === false) { // Something went wrong
echo 'An error occurred when retrieving concert info.';
} elseif (!isset($ArtistEvents['events']['event'])) { // No upcoming events
echo 'This artist has no upcoming concerts.';
} else {
echo '
';
if (isset($ArtistEvents['events']['event'][0])) { // Multiple events
foreach ($ArtistEvents['events']['event'] as $Event) {
make_concert_link($Event);
}
} else { // Single event
make_concert_link($ArtistEvents['events']['event']);
}
echo '
';
}
?>