PHP:生成一个没有{}的json?

I need to produce a php json like this using php from MYSQL database:

[['Staff Welfare', 'london', 'map-marker-icon.png'] , ['perfect', 'London', 'map-marker-icon.png'] , ['Fare Trade', 'essex', 'map-marker-icon.png'] , ['Fare Trade', 'london', 'map-marker-icon.png'] ,]

This is what I've tried:

$return_arr = array();
$sql = "SELECT * FROM restaurants";
if ($result = mysqli_query($db_conx, $sql )){
    while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {

    $row_array['id'] = $row['id'];
    $row_array['location'] = $row['location'];
    $row_array['name'] = $row['name'];
    $row_array['type'] = $row['type'];


    array_push($return_arr,array($row_array));
   }
 }

mysqli_close($db_conx);

echo json_encode($return_arr);

But the above code echo's something like this:

[[{"id":"1","location":"london","name":"Staff","type":"indian"}], [{"id":"2","location":"London","name":"perfect","type":"chinese"}],[{"id":"3","location":"essex","name":"Trade","type":"kebab"}],[{"id":"5","location":"london","name":"Fare Trade","type":"kebab"}]]

could someone please let me know how I can remove the {} and also remove column names as well so my json echo's like what I am looking for?

You have to get rid of array keys to produce json without {}. Change the array_push code to this:

array_push($return_arr, array_values($row));

array_values function will return only $row values without keys.

Your quoted desired JSON is invalid, but it would be valid if you changed the ' to " and removed the final ,:

[
    ["Staff Welfare", "london", "map-marker-icon.png"],
    ["perfect", "London", "map-marker-icon.png"],
    ["Fare Trade", "essex", "map-marker-icon.png"],
    ["Fare Trade", "london", "map-marker-icon.png"]
]

That's an array containing arrays containing three entries each, all of which are strings.

If you don't want objects in the JSON, don't push associative arrays into the result array in PHP.

Your while loop should be:

while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
    array_push($result_arr, array(
        $row['name'],
        $row['location'],
        $row['some-field-you-have-not-shown-giving-image-link']
    ));
}

Note that what's being pushed is a boring non-associative array with three entries. (Also note that you haven't shown which column name gives the image links, so I've used a descriptive one above.)