How can the order of numbers in an array be randomized while ensuring each number appears only once?

To randomize the order of numbers in an array while ensuring each number appears only once, we can first create an array with the desired numbers in sequential order. Then, we can use the `shuffle()` function in PHP to randomize the order of the elements in the array. Finally, we can iterate through the shuffled array to get the randomized order of numbers.

// Create an array with numbers in sequential order
$numbers = range(1, 10);

// Randomize the order of numbers in the array
shuffle($numbers);

// Iterate through the shuffled array to get the randomized order of numbers
foreach ($numbers as $number) {
    echo $number . " ";
}