Here is my exact code.
<?php
echo "<! <";
?>
And this is the returned string.
<! >
Why is the last character changing?
Here is my exact code.
<?php
echo "<! <";
?>
And this is the returned string.
<! >
Why is the last character changing?
I have created an identical script as that detailed by the OP.
In Firefox v3.6.3, the browser displays <! <
.
In Google Chrome v4.1, the browser display is blank, but the source shows <! >
.
In Internet Explorer 8, the browser displays <! <
.
In Opera v10.53, the browser displays <
and the source shows <! <
.
Not sure which browser you are having difficulties in, or, for that matter, why you would be wanting to display these characters in a browser window.
If you are wanting these characters to be displayed, literally, then using something like htmlentities()
to convert these characters into HTML characters which will be displayed through the browser, would be the recommended way to make that happen.
if you give it a "Content-Type: text/plain" header, chrome should render it normally.
it's possible you are either sending a "text/html" header or not sending a Content-Type header at all, so the browser must guess what kind of content it is.