筆記一下..
input:
- $data = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);
- echo json_encode($data);
output:
- {"a":1,"b":2,"c":3,"d":4,"e":5}
input:
- $data = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
- var_dump(json_decode($data));
- var_dump(json_decode($data, true));
output:
- object(stdClass)#1 (5) {
- ["a"] => int(1)
- ["b"] => int(2)
- ["c"] => int(3)
- ["d"] => int(4)
- ["e"] => int(5)
- }
- array(5) {
- ["a"] => int(1)
- ["b"] => int(2)
- ["c"] => int(3)
- ["d"] => int(4)
- ["e"] => int(5)
- }
我都記下來了,免忘記了找不到。
You have given a clear description of the topic..
technical related post..Was useful for my work..