Display the drop-down list

json_decode()

« join | json_encode »
<?php
$mixed 
json_decode (
    
// string $json
    
?// [bool $assoc = false]
    
// [int $depth = 512]
    
?  // [int $options = 0]
);
?>
Result
$mixed = [
  
'a' => 1,
  
'b' => 2,
  
'c' => 3,
  
'd' => 4,
  
'e' => 5,
]
Examples
#1 json_decode  ('{"a":1,"b":2,"c":3,"d":4,"e":5}')
#2 json_decode  ('{"a":1,"b":2,"c":3,"d":4,"e":5}',
 
true)
#3 json_decode  ('{"foo-bar": 12345}')
#4 json_decode  ("{ 'bar': 'baz' }")
#5 json_decode  ('{ bar: "baz" }')
#6 json_decode  ('{ bar: "baz", }')
#7 json_decode  ('{"1":{"English":["One","January"],"French":["Une","Janvier"]}}')
#8 json_decode  ('{"number": 12345678901234567890}')
#9 json_decode  ('{"number": 12345678901234567890}',
 
false,
 
512,
 
JSON_BIGINT_AS_STRING)
See also
json_encode, json_last_error