I'm using a php script to display all rows of a mysql database. I'd like to make a google adsense ad show up at the end of each output, or after each row is displayed. So far the ad is only displaying after the first, or first two, rows are displays.
Is there another way of going about this?
THanks
Is there another way of going about this?
THanks
Code:
$query ="SELECT id, text";
$query.=" FROM table ORDER BY rand() DESC";
$result=mysql_query($query);
while (list($id,$text) =
mysql_fetch_row($result)) {
echo $text;
?>
<script type="text/javascript"><!--
google_ad_client = "**";
/* 468x60, created 8/17/09 */
google_ad_slot = "*****";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php
}
?>