Convert JSON string to PHP Array

后端 未结 9 1176
渐次进展
渐次进展 2020-12-16 03:43

I have the following JSON string, which was an Objective C array then encoded to JSON:

 $jsonString=[\\\"a@gmail.com\\\",\\\"b@gmail.com\\\",\\\"c@gmail.com\         


        
9条回答
  •  醉酒成梦
    2020-12-16 04:22

    Assuming the lack of quotes around your JSON in the question is a transposition error during posting, then the code you're using is fine: http://codepad.org/RWEYM42x

    You do need to ensure your string is UTF8 encoded. You can use the built in encoder if it isn't ( http://php.net/manual/en/function.utf8-encode.php ).

    For any further help, you need to actually tell us what you are getting with your code.

提交回复
热议问题