'how to remove index in php response

I've a variable $response which is an array and contains the below response

"example": {
     "1": {
         "name": "stan",
         "city": "NY"
      },
     "2": {
         "name": "wilson",
         "city": "FL"
      }
 }

How can I remove the indexing from the response?

php


Solution 1:[1]

This may help:

array_values($response);

This resets all the keys/indexes of the array.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Henryc17