function filterCity($dbAdapter) { $gate = new CityTableGateway($dbAdapter); $result = $gate->findCitiesWithImages(); foreach ($result as $row) { echo '<option value="' . $row->GeoNameID . '">'; echo $row->AsciiName; echo '</option>'; } }