What is the best way to ensure that each number in a Lotto system only appears once in PHP?

To ensure that each number in a Lotto system only appears once in PHP, we can use the `array_unique()` function to remove any duplicate numbers from an array of numbers. This function will return an array with only unique values, effectively ensuring that each number appears only once.

$numbers = [1, 2, 3, 4, 5, 5, 6, 7, 8, 9];
$uniqueNumbers = array_unique($numbers);

print_r($uniqueNumbers);