A good way to do this is using break. Try taking a look at http://www.php.net /Quick 
Reference / break. It's more powerful than it seems! Exiting nested loops is only one 
of the possibilities.

BR,

Fábio Ottolini

> -----Original Message-----
> From: Jorge Santos [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 09, 2001 11:17 AM
> To: Gaby
> Cc: PHP-DB
> Subject: Re: [PHP-DB] Join Sentences 
> 
> 
> Hi  Gaby,
> 
> Your best bet is to probably place the statements you want 
> into a function.
> Then, when the function is called if any one statement fails 
> you simply
> return from the function with an error code.
> 
> Hope this answer helps you...
> 
> --------------------------
> (No Espanol mas Portugues)
> O melhor a fazer e para por as declaracoes numa funcao. 
> Depois quando chamar
> a funcao, se alguma declaracao erra, regresse da funcao com um codico
> proprio.
> 
> Espero que esta resposta lhe pode ajudar.
> 
> Later,
> Jorge
> [EMAIL PROTECTED]
> ----- Original Message -----
> From: Gaby <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 09, 2001 7:59 AM
> Subject: [PHP-DB] Join Sentences
> 
> 
> Hi,
> 
> ( Excuse me for my english )
> 
> I wish execute in PHP some consecutives sentences , but if one of them
> returns un error, the program must'n execute anyone. I need one set of
> sentences that executes the code like one.
> 
> I don't know if I explain ... Thanks a lot.
> ---
> Por si acaso alguien me entiende mejor en español :
> Lo que me gustaria es ejecutar un grupo de sentencias como si 
> fueran solo
> una

Reply via email to