Prevent browse to render HTML when using htmlentities() function in PHP

lissasverdlova

New Member
I want to display the output of PHP echo statement on the browser. The result is output of \[code\]htmlentities()\[/code\] function of PHP.\[code\]$str = "A 'quote' is <b>bold</b>";// Expected Outputs: A 'quote' is <b>bold</b>echo "<textarea>".htmlentities($str)."</textarea>";// Expected Outputs: A 'quote' is <b>bold</b>echo "<textarea>".htmlentities($str, ENT_QUOTES)."</textarea>";\[/code\]Apparently, it is giving me \[code\]A 'quote' is <b>bold</b>\[/code\] inside my \[code\]<textarea>\[/code\]Please advise.
 
Back
Top