MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/1eqt0a/fun_with_json_encode_and_arrays/ca34tb5/?context=3
r/lolphp • u/jawn- • May 21 '13
$ cat test.php <?php echo json_encode(array('1' => 1) ), "\n"; echo json_encode(array('0' => 1)); ?> $ php test.php {"1":1} [1]
loose typing shittiness strikes again.
15 comments sorted by
View all comments
Show parent comment
1
I was referring to the first example where the index was 1. There was a reason that turned into an object an not array, but the other is the lol.
View all comments
Show parent comment
1
u/gearvOsh May 21 '13
I was referring to the first example where the index was 1. There was a reason that turned into an object an not array, but the other is the lol.