Here is my HTML code.
<?php
// php code that adds a single div
?>
<script id = "conf">
There is clearly two return characters after the final
?>
However, the output is like this:
<div id='conf'></div>
<script id = "conf">
It seems a return character (line terminator ) was "sucked up". It appears that the PHP snippet does this some how.
Why is this?
Is this expected behavior?
I just find it odd. Obviously a return character could be added, but how is one subtracted? Just find it odd.
Clarification:
I'm talking about under view source. Not the actual HTML document.
The closing tag for the block will include the immediately trailing newline if one is present.
As per the PHP manual.
I agree it seems a bit strange. I ran into this behavior when trying to format and indent the resulting HTML. To force a newline, add a space at the end of the line and it will be rendered.