How can you reorganize array index numbers in PHP?

When working with arrays in PHP, you may encounter a situation where you need to reorganize the index numbers of the array elements. This can be done by using the array_values() function, which will reindex the array starting from index 0. This function will create a new array with the elements reindexed in the order they appear in the original array.

// Original array with non-sequential index numbers
$array = array(0 => 'apple', 2 => 'banana', 4 => 'orange');

// Reorganize array index numbers
$reorganizedArray = array_values($array);

// Output the reorganized array
print_r($reorganizedArray);