How to re-index the values of an array in PHP? [duplicate]

Solution 1:

array_values() will re-index the array.