I am designing a website and I have ran into a problem with my HTML. I am executing and echoing content from a PHP file to then display on my page, but my browser is adding a number 1 after the content from the PHP file has been parsed.
Here is my HTML (and PHP):
<section id="header">
<div style="float: left; padding-top: 0px; vertical-align: central;">
<a href="/home"><img src="/img/site/logo.png" alt="DibDibCraft Logo" height="50" width="167" class="logo" /></a>
</div>
<?php echo(include($_SERVER['DOCUMENT_ROOT'] . '/htm/header.php')); ?>
</section>
and here is the content from header.php
:
<link rel="stylesheet" type="text/css" href="/style/layout.css" />
<div id="navBarBtnContainer">Hello</div>
The 1 is being placed after the content from header.php
is parsed and befoe the end of the section (before the </section>
mark). Here is a screenshot:
As you can see, the number 1 is being added before </section>
.
I have checked my code in a HTML and a PHP parser and both have returned no errors that would give a result like this.
I also don't know what the name of this error is (if it is an error), so I haven't been able to find help without asking on this site, so ny apologies if this is a duplicate question, could you please direct me to a question that may help with this problem if this is a duplicate.
Thanks a lot, DibDibs
PS: Could you also tell me why this is happening, this will help me avoid making the same error again in the future, thanks :)