Currently I'm returning a PHP array via Ajax in the form of:
$months = array(November, December, January);
Once I return the value to Javascript I need to format it in this way for it to be compatible with a js Library I'm using:
var months = [[0, "November"], [1, "December"], [2, "January"]];
I tried returning it as an associative array from PHP and json encoding it to which I receive:
[["November"],{"1":"December"},{"2":"January"}]
Why does the index number 0 disappear once json_encoded? And also is this format the same as the one before it?