L'instruction break permet de sortir d'une boucle.
$i = 0; while ($i < 10) { if ($arr[$i] == "stop") { break; } $i++; }