Reputation: 53
I have a form that has a field called post content, I am using WYSIWYG Editor to allow the end-user to format the text before saving it or update into the database. the problem that I am facing when it retrieves such content using echo like:
<p><?php echo $post_content ?></p>
it will be displayed like that to the end-user.
This <b>Course </b>is Wonderful. I encourage everyone to take it.
So how can i display the retrieved data correctly as per their formates?
Upvotes: 2
Views: 51
Reputation: 237
Try this instead:
<p><?php echo htmlspecialchars_decode($post_content) ?></p>
Upvotes: 2