Home  >  Article  >  Backend Development  >  Work notes--Things to pay attention to when converting json data into arrays in PHP

Work notes--Things to pay attention to when converting json data into arrays in PHP

WBOY
WBOYOriginal
2016-08-08 09:30:36794browse

J PHP has two JSON conversion functions:

json_encode converts the array to json

json_decode to convert json to string objects, JSON_DECODE's second parameters can make BOOL value

json_decode ($ a, true); in this way json object is converted to an array.

Note: It must be in utf8 format.

The above introduces the work notes-php converts json data into arrays, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn