Foreach loop with more than 50 results hangs up the system

If we are referencing back to the other post. Checkboxes creating a funny loop with input values (Possible Bug) or Improvement

It’s somehow returning the number of array $keys, plus 1 array.

this array.

$array = array(‘green’ => ‘blue’, ‘tan’=> ‘red’, ‘tan’ => ‘green’,);

Gives this result. Also notice it combines any simular $keys but also counts the array then loops through that many times. + 1.

Array ( [green] => blue [tan] => green ) Array ( [green] => blue [tan] => green ) Array ( [green] => blue [tan] => green ) Array ( [green] => blue [tan] => green ) Array ( [green] => blue [tan] => green ) Array ( [green] => blue [tan] => green ) Array ( [green] => blue [tan] => green )