whats going on http://imgtags.com/ its on the main page <? print "<div id='banner'><script type="text/javascript"><!-- google_ad_client = "pub-2435134404576417"; //468x60, created 12/15/07 google_ad_slot = "1019639685"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div>"; ?> PHP: Thats whats in the ad.php
remove the php code part. <div id="banner"><script type="text/javascript"><!-- google_ad_client = "pub-2435134404576417"; //468x60, created 12/15/07 google_ad_slot = "1019639685"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div> HTML:
Just so you know what was going on here the problem was the fact that your code has quotes in it. When you do print "HERE IS MY STRING"; PHP: Anything with " will cause it to believe that this is the end of the statement. The way to solve this is to use an escape character so it would become \" at every quote that you do not want to end the string. Of course in this case it's easier to just have the HTML there as someone suggested.
You need to escape the quotes if going to process it by php, also use echo, it is better. <?php echo "<div id='banner'><script type=\"text/javascript\"><!-- google_ad_client = \"pub-2435134404576417\"; //468x60, created 12/15/07 google_ad_slot = \"1019639685\"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"> </script></div>"; ?> PHP: