Skip to content

Instantly share code, notes, and snippets.

@zanematthew
Created August 11, 2012 05:17
Show Gist options
  • Save zanematthew/3321350 to your computer and use it in GitHub Desktop.
Save zanematthew/3321350 to your computer and use it in GitHub Desktop.
Displaying emails and venue names
<?php
$venues = new Venues;
$venue_ids = $venues->IDs();
$count = count( $venue_ids );
$i = 1;
print '<pre>';
foreach( $venue_ids as $id ){
$email = $venues->contactEmail( $id );
if ( ! $email ){
$i++;
} else {
print "Venue: {$venues->getName( $id )} -- {$email}\n";
}
}
print "--\n";
print "{$count} total Venues, {$i} do not have email addresses";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment