Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从用户发布数据,然后转换为 JSON 数据并存储在数据库中。为了避免转义字符的问题,我使用了
$jsonData = json_encode($array_json_data,JSON_HEX_APOS|JSON_HEX_QUOT);
并将转义字符转换为 UXXXX 字符。
现在我在解码这些数据时遇到问题。
例如,如何从 U0027 打印报价。
使用 html_entity_decode 将引号转换为其实际的字符串表示