I am trying to print an array on php when I use
echo json_encode($array);
It shows me this:
{
"1": {
"x": "145",
"y": "20"
},
"2": {
"x": "145",
"y": "40"
}
}
but I want this:
{
{
"x":"145",
"y":"20"
},
{
"x":"145",
"y":"40"
}
}
How to do that?