Q:

Php remove JSONArray

I have a JSONArray like this
[
  {
    "id": 64,
    "name": "leroy"
  },
  {
    "id": 82,
    "name": "guillaume"
  }
]

Is it possible to return this instead, with PHP?
{
  "id": 64,
  "name": "leroy"
},
{
  "id": 82,
  "name": "guillaume"
}

Thanks,

A:

please use below code for remove brackets in json
str_replace(array('[', ']'), '', htmlspecialchars(json_encode($result), ENT_NOQUOTES));

