Exit while en php

Résolu/Fermé
Fallentree Messages postés 2309 Date d'inscription mercredi 25 février 2009 Statut Membre Dernière intervention 22 juillet 2019 - 4 juil. 2009 à 01:44
Fallentree Messages postés 2309 Date d'inscription mercredi 25 février 2009 Statut Membre Dernière intervention 22 juillet 2019 - 4 juil. 2009 à 01:58
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...
A voir également:

1 réponse

Fallentree Messages postés 2309 Date d'inscription mercredi 25 février 2009 Statut Membre Dernière intervention 22 juillet 2019 208
4 juil. 2009 à 01:58
break....
5