Answer the question
In order to leave comments, you need to log in
What is my mistake when manipulating json?
A classic example that works
<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
var_dump(json_decode($json, true));
?>
array(5) {
["a"] => int(1)
["b"] => int(2)
["c"] => int(3)
["d"] => int(4)
["e"] => int(5)
}
<?php
$json = '{"a":1,"b":2,"c":3,"d":4,"e":5}';
$a = (json_decode($json, true));
print_r ($a)
?>
Array ( [a] => 1 [b] => 2 [c] => 3 [d] => 4 [e] => 5 )
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question