What is the best approach to creating a new array in PHP to store unique entries from an existing array?

When creating a new array in PHP to store unique entries from an existing array, one approach is to use the `array_unique()` function. This function removes duplicate values from an array and returns a new array with only unique values. By passing the existing array as an argument to `array_unique()`, we can easily create a new array containing only unique entries.

// Existing array with duplicate entries
$existingArray = [1, 2, 2, 3, 4, 4, 5];

// Create a new array with unique entries
$uniqueArray = array_unique($existingArray);

// Print the new array with unique entries
print_r($uniqueArray);