<?php$array = [2,3,4];//go through numbers from 1 to 10 and store it as $ifor ($i=0; $i <= 10; $i++) { //if $i is not in array echo it, the "!" changes the boolean value if ( !(in_array($i, $array)) ) { echo $i; }}?>如果您需要更多解释,请告诉我,因为代码看起来不言自明