$Header = 'test';
$Text = '<p class="test">Text></p><p class="test">Text></p>';
$message ='
<html>
<head>
<title>'.$Header.'</title>
</head>
<body>';
$message .='
<p>'.$Header.'</p>
<p></p>';
$message .="$Text";
$message .='
</body>
</html>
';
echo $message;
outputs:
test
<p class="test">Text></p><p class="test">Text></p>
As we can see, the line <p class="test">Text></p><p class="test">Text></p>
is displayed as string, not as an html entity.
How could I add $Text
to $message
variable so as I get it as an html entity ?
P.S.: the people I understand that for some, it is an easy question, but if You vote against it, please write the answer. many people do not know the answer to this question.