set_charset("utf8"); $result4 = mysqli_query($con,"SELECT * FROM events where active = 'y' ORDER By date_sort"); //grab all the recent events while ($r = mysqli_fetch_array($result4)) { //the format is $variable = $r["nameofmysqlcolumn"]; $url_scheme = $r['url_scheme']; $title = $r['title']; $home_img_link = $r['home_img_link']; $date_display = $r['date_display']; $text_blurb = $r['calendar_blurb']; $rsvp_allow = $r['rsvp_allow']; $ticket_link = $r['ticket_link']; $es_id = $r['es_id']; $ticket_btn_text = $r['ticket_btn_text']; $external_link = $r['external_link']; if($external_link) { $eventlink = "$external_link\" target=\"_blank"; } else { $eventlink = "/event/$url_scheme/"; } if ($rsvp_allow=="y") { $rsvp_allow = "GUEST LIST"; } else { $rsvp_allow = ""; } if($ticket_btn_text) { $ticket_text="$ticket_btn_text"; } else { $ticket_text="TICKETS"; } echo "
$date_display
$title
$text_blurb
"; } ?>