Exit while en php

Résolu
Fallentree Messages postés 2445 Statut Membre -  
Fallentree Messages postés 2445 Statut Membre -
Bonjour,
Exit while existe t il en php ?


<?
function je_cherche {
While (J'ai_un_suivant){
if test_condition_rempli then {
je_fais_ce_qui_doit_etre_fait;
exit while;
}
}
?>

OU doit on rediger dans le cas ou je n ai pas de exit while en php ?

<?
function je_cherche {
do {
j'en_prend_un;
} While (!test_condition & J'ai_un_suivant);
if (test_condition) then je_fais_ce_qui_doit_etre_fait;
}
?>

Merci...

1 réponse

Fallentree Messages postés 2445 Statut Membre 209
 
break....
5