0
我有textarea字段,用户可以在其中编写随机文本。张贴后,我需要把这个文本到json变量通过php。php将文本转换为json变量
类似的东西,文字:
Lorem Ipsum is simply "dummy text" of the printing\typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
,且该文本必须转换成有效的JSON变量。 ?任何帮助)
给您的预计结果的expample。 –
{“textarea”:“Lorem Ipsum is simply ....”}所有问题是,这个字符串必须是json有效 - 没有双引号,新行和其他任何非有效元素 –
所以你想删除所有特殊字符? –