Sunday, August 06, 2017
... be careful with arrays.
If you have a non-sparse array then that can be encoded using json-encode($thisArray, true);
The problem comes if your sparse array has a negative key. I hit this - the key will list if you iterate through the keys (albeit AFTER the positive keys!) but you can't access the value.