How does the use of array_values impact the indexing of elements in an array in PHP?

When using array_values in PHP, it reindexes the array numerically starting from 0. This can be useful if you want to reset the keys of an array to start from 0 without gaps. It can also be helpful if you want to remove any associative keys and only keep the numerical indexes.

// Original array with associative keys
$array = array("a" => "apple", "b" => "banana", "c" => "cherry");

// Reindex the array numerically starting from 0
$reindexedArray = array_values($array);

// Output the reindexed array
print_r($reindexedArray);