break は、現在のループ構造を抜け出します。
1 2 $i = 0; 3 while ($i < 10) { 4 if ($arr[$i] == "stop") { 5 break; 6 } 7 $i++; 8 } 9