I have a php site. I have been given code for an auto-sizing ad from google adsense. I have put this within a "div" to align it, and have created a function to echo the adsense code within my php script;
<html>
<head>
<title>MY WEBSITE</title>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
<?php include("title.php"); ?>
<?php
$googleadsensecode = ' //a function for the adsense code.
<div align="center"> //<div> to align the ad.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive_TextnDisplay_20160127 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9232383262111727"
data-ad-slot="4287484293"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>';
echo $googeladsensecode;
</body>
</html>
However the ad is taking up the whole page, and thus is presumably not picking up on the remaining website's content.
What is the error in my code or my approach?