How to remove htmlentities() values from the database?

前端 未结 6 1576
星月不相逢
星月不相逢 2021-02-08 04:42

Long before I knew anything - not that I know much even now - I desgined a web app in php which inserted data in my mysql database after running the values through htmlent

6条回答
  •  隐瞒了意图╮
    2021-02-08 05:04

    I think writing a php script is good thing to do in this situation. You can use, as Dave said, the html_entity_decode() function to convert your texts back.

    Try your script on a table with few entries first. This will make you save a lot of testing time. Of course, remember to backup your table(s) before running the php script.

    I'm afraid there is no shorter possibility. The computation for millions of rows remains quite expensive, no matter how you convert the datasets back. So go for a php script... it's the easiest way

提交回复
热议问题