Its correct. If you are passing an array to the json_encode function it will
return something like '[1,2,3]' and this will be evaluated to a javascript
array.

if you had a hash, i.e. an array which its indexes are strings, then you
would have '{"1":2, "a": "bc"}', and it would give you a javascript object
on response.JSON.


--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces


On Sat, Dec 12, 2009 at 12:34 PM, mmjaeger <[email protected]> wrote:

> Hello
> I'm kind of confused at the moment - I'm returning an array to
> javascript from PHP like this: print json_encode($array);
>
> when I checking the $type of responseJSON in my function, I'm getting
> an array - is this correct  - am I doing anything wrong here.
>
> I was expecting to get an object instead of an array but maybe I'm
> mistaken.
>
> Thanks
>

Reply via email to