How can PHP be used to check for uniqueness in an array of numbers stored in a CSV file?

When dealing with an array of numbers stored in a CSV file, we can use PHP to check for uniqueness by reading the CSV file, storing the numbers in an array, and then using the `array_unique()` function to remove any duplicates. We can then compare the length of the original array with the length of the array after removing duplicates to determine if there are any duplicate numbers present.

<?php
// Read the CSV file and store numbers in an array
$file = fopen('numbers.csv', 'r');
$numbers = [];
while (($data = fgetcsv($file)) !== false) {
    $numbers[] = $data[0];
}
fclose($file);

// Check for uniqueness
$uniqueNumbers = array_unique($numbers);
if(count($numbers) == count($uniqueNumbers)) {
    echo "All numbers are unique.";
} else {
    echo "Duplicate numbers found.";
}
?>