Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Shivamyadav's avatar

Show the image on the front-end from the ckeditor description.

After saving the ckeditor data with text and images to the database in core php I want to show the image from the description field which is as a text how to extract only the image part to render the image and leave the rest of the text to be render as html .

My data in table

<p> Example </p> 
<Img src="imagename.jpg" />
0 likes
1 reply
Jsanwo64's avatar

If your goal is to show the full CKEditor content, including images:

<?php
echo html_entity_decode($row['description']);
?>

Please or to participate in this conversation.