Well, it's weird to me, but I realise that I am biased and lacking in knowledge...
I have the following bit of code that builds up a string of 3 includes.
The return from this function is simply echoed to screen.
The code sort of works fine with the exception of one thing. On screen, at the end of the HTML, there are some additional "1's". The number of 1's that are printed after the HTML is always the same as the number of includes. For example, for testing this, if I include the foooter twice, the number of 1's increases to 4 and back to 3 on removal of the additonal footer. The same holds true for any of the includes.
The HTML is shown underneath. All good, except for the trailing 1's.
I've tried to google for this but am struggling to find the answer. Any help or insight is much appreciated.
I have the following bit of code that builds up a string of 3 includes.
PHP:
function redirectPage ($content, $destination, $folderLevel) {
$codeToReturn = '';
if ($folderLevel ==1) {
$path = "../res/";
}
else {
$path = "../../res/";
}
$codeToReturn .= include ("../../includes/top_section_redirect.php");
$codeToReturn .= include ("../../includes/content_redirect.php");
$codeToReturn .= include ("../../includes/footer.php");
return $codeToReturn;
}
The code sort of works fine with the exception of one thing. On screen, at the end of the HTML, there are some additional "1's". The number of 1's that are printed after the HTML is always the same as the number of includes. For example, for testing this, if I include the foooter twice, the number of 1's increases to 4 and back to 3 on removal of the additonal footer. The same holds true for any of the includes.
The HTML is shown underneath. All good, except for the trailing 1's.
Code:
/////snip/////
</body>
</html>111
I've tried to google for this but am struggling to find the answer. Any help or insight is much appreciated.
