I have the following code.
<?php if ( $showdata['venue'] == "Brean Sands" ) {echo "<div class=\"gigpress-related-park\">"; echo $showdata['date_long']; echo $showdata['venue']; echo "</div>"; } ?>
<?php if ( $showdata['venue'] == "Camber Sands" ) {echo "<div class=\"gigpress-related-park\">"; echo $showdata['date_long']; echo $showdata['venue']; echo "</div>"; } ?>
<?php if ( $showdata['venue'] == "Pakefield" ) {echo "<div class=\"gigpress-related-park\">"; echo $showdata['date_long']; echo $showdata['venue']; echo "</div>"; } ?>
<?php if ( $showdata['venue'] == "Prestatyn Sands" ) {echo "<div class=\"gigpress-related-park\">"; echo $showdata['date_long']; echo $showdata['venue']; echo "</div>"; } ?>
<?php if ( $showdata['venue'] == "Southport" ) {echo "<div class=\"gigpress-related-park\">"; echo $showdata['date_long']; echo $showdata['venue']; echo "</div>"; } ?>
This pulls the information from my db just fine, but I need it to loop, or repeat so that multiple dates appear for each venue. There are multiple dates for each venue in the db, but as the code is, it only returns the value for the first date. I need the others to appear as well.
How do I get this code to loop while looking at only one venue and pull all dates, then end?