Skip to content
Advertisement

php json response with curly bracket [closed]

The problem is to get an object result instead of array in json.

here is my code :

JavaScript

and the result is somtimes like :

JavaScript

and I want it a pure json like :

JavaScript

Advertisement

Answer

Try something like this:

JavaScript

That will return everything encased in { }

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement