PHP 中提供了 json_encode() 和 json_decode() 两个函数分别创建和解析 JSON 数据,其中:
json_encode() 函数能够将一个 PHP 变量转换为 JSON 数据,其语法格式如下:
json_encode(mixed $value, int $options = 0, int $depth = 512)json_encode(数组, 可选参数JSON_UNESCAPED_UNICODE, 可选参数int $depth = 512
上一篇:51单片机定时器基础知识