?>
			<li><a href="#"><?php 
    echo $what;
    ?>
</a></li>
		<?php 
}
?>
	</ul>

	<?php 
$max = 2;
$format = 'json';
//Get All Active APIs
$citygrid = new citygridads($publishercode);
$sponsored = $citygrid->custom_ads_where($what, $where, $max, $format);
if (count($sponsored->ads) > 0) {
    ?>
		<p align="right">sponsored listings</p>
		<table cellpadding="5" cellspacing="5" with="450" align="center" class="zebra-striped">
			<tbody>				
			<?php 
    foreach ($sponsored->ads as $ad) {
        $id = $ad->id;
        $type = $ad->type;
        $listingId = $ad->listingId;
        $name = $ad->name;
        $street = $ad->street;
        $city = $ad->city;
        $state = $ad->state;
        $zip = $ad->zip;