array_unique and then renumbering keys [duplicate]

Easiest way would be to put them into a new array either via a loop, or better yet array_values function.

$new_array = array_values($original_array)

More information

Leave a Comment