Display the text (HTML) saved in the database using CkEditor

I have used CKEDITOR
for saving some text in mysql database
, it is saved in format like I have shown below

Buy 2 Buffet and Get 1 Free (Mon-Wed-Thu-Fri-Sat-Sun)
Lunch buffet-Rs.399
Dinner Buffet-
Rs.499

For Displaying it I have used php code like

echo htmlspecialchars_decode(stripslashes($main_row['meta_value']))

But it is showing output like

Buy 2 Buffet and Get 1 Free (Mon-Wed-Thu-Fri-Sat-Sun)
Lunch buffet-Rs.399
Dinner Buffet-

I want to display this data as text, please help me out.

Just try to use

echo htmlspecialchars_decode(htmlspecialchars_decode($text));

And it will work .

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 后端存储 » Display the text (HTML) saved in the database using CkEditor

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录