I am trying to print php variable which contains html tag in it. I want to display it as html but it is print it as plain text. Below is my code:
$final= $first . $second . $third;
echo $final;
echo htmlentities($final);
echo htmlspecialchars($final);
$first value is <iframe
$second value is width="960" height="540"
$third value is src="" allowfullscreen="true"></iframe>
so $final combine string of all 3 variable which I intend to display it as an iframe. But it just display text as below:
<iframe width="960" height="540" src="" allowfullscreen="true"></iframe>
htmlentitiesandhtmlspecialcharsthen?