How can numerical index arrays be combined and iterated through to prevent duplicate outputs in PHP?

To prevent duplicate outputs when combining and iterating through numerical index arrays in PHP, you can use the `array_merge` function to merge the arrays and then use the `array_unique` function to remove any duplicate values. This ensures that each value is only output once during iteration.

$array1 = [1, 2, 3];
$array2 = [3, 4, 5];

$combinedArray = array_unique(array_merge($array1, $array2));

foreach ($combinedArray as $value) {
    echo $value . "<br>";
}