without right-clicking the browser just to view the source, how to display php results as html markup so user can also copy it.
example:
$var = 'ipsum'; //user input stored in variable
<p style="align="center">Lorem <?php echo $var; ?> dolor sit amet</p>
output:
Lorem ipsum dolor sit amet
at the same time, I want to show the html markup so the user can directly copy it without viewing the source like so:
<p style="align="center">Lorem ipsum dolor sit amet</p>
How do I do this in php? appreciate the help. thanks
try this :
or :