I am trying to json_encode an array which is returned from a Zend_DB query.
var_dump gives: (Manually adding 0 member does not change the picture.)
a
How are you setting up your initial array?
If you set it up like:
array(
"1" => array(...),
"2" => array(...),
);
then you don't have an array with numeric indexes but strings, and that's converted to an object in JS world. This can happen also if you don't set a strict order (i.e. starting at 0 instead of 1).
This is a shot in the dark, however, because I can't see your original code: try setting your array without using keys at all in the first place:
array(
array(...),
array(...),
);