Skip to content
Advertisement

Need to remove squre bracket json_encode(array())

Below is my code and it return me json array but i need to remove square bracket from response

JavaScript

And response is

JavaScript

i need to remove {“posts”:[ this from the starting square bracket and ]} also from the end.

Please help me out from this problem

Advertisement

Answer

Use, You can remove array('posts'

JavaScript

instead of

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