php array 转化 JSON 格式化输出

Ng
2019.04.26
Comment

json_encode ( mixed $value [, int $options = 0 [, int $depth = 512 ]] ) : string

返回字符串,包含了 value 值 JSON 形式的表示。

例子: 1,'b'=>2,'c'=>3,'d'=>4,'e'=>5); echo json_encode($arr); ?>

输出:

{"a":1,"b":2,"c":3,"d":4,"e":5}

Json

Add new comment