I would like to put the adsense code into my header. But it's an html code. So what i have come up with now is i put it into layout.tpl and in the header line (at the top where img_15 is in obsess blue)
the code originally was:
<script type="text/javascript"><!--
google_ad_client = "ca-pub-############";
/* Header */
google_ad_slot = "8775993061";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
What i thought i would do is substitute:
<div class="size">
<div class="header">
<div class="header01">
<div class="logo">
<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />
</div>
the img src with my script. However its in html not in php so i did a little research and came up with this
<script type=\"text/javascript\"><!--
google_ad_client = \"ca-pub-############\";
/* Header */
google_ad_slot = \"8775993061\";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>
What i did is is i put \ after every quotation and now i want to put that into this :<?php echo('whatever HTML'); ?>
And that should work. However i tried and it didnt What did i do wrong?
How do i put it into this ?
<div class="size">
<div class="header">
<div class="header01">
<div class="logo">
<img src="<?php echo SITE_URL?>/lib/skins/ObsessBlue/image/img_15.jpg" alt="" />
</div>