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}
related posts
1 min
2 mins
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}