Set the content type as text
and you can see your output in your browser.
";
echo $var;
?>
It is because your browser is expecting html and it doesnt understand the php tags you have in the output.
Other wise using htmlspecialchars
function would be a better option.