I was unable to output this:
[{"title":"London","foo":"bar"},{"title":"Istanbul","foo":"bar"}]
I cannot make comma here: },{
I can output this [{"title":"London","foo":"bar"}] but not the first example.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This will produce the desired output:
Make sure you create your arrays correctly. For more information have a look at the documentation for
json_decode.