Please see the picture below. I need to set my page like below.
I'm using PHP, to show the HTML code I got success.
<?php
$post = "<p>I like this</p>";
$get_post = htmlspecialchars($post);
?>
and the result will be :<p>I like this</p>
<-- All html code display.
But now, if I have an image file,
<img src="logo.png"/>
It won't display the image, but html display.
What I want is, how can I set all HTML code display except image HTML code <img>
?
Please see the image below for example.
Additional Information
1. We only have 1 variable, that's $post
2. Assume $post retrieve from database
Example 1: $post = "<html><p>a</p><img src='logo.png'/></html>";
Example 2: $post = "<img src='logo.png'/>";
Please see the picture above for example.