My problem was solved no need to argue. I don't see why use a while
loop with a count variable when it produces the same result as a
foreach loop. As for using a break in the loop, I could add it but the
loop is gonna stop anyway as soon as it hits the end of the array. I
also didn't see the point
Just for the record, I'll sign that one.
There is a reason for continue, break and return to exist.
Just make sure, that your code is understandable and there is no problem using
these exits.
If your code is that complicated, that you don't understand a break in it, the
problem is another.
Samue
I follow this rule of thumb: small blocks of highly understandable code. If
this demands ternary conditionals or breaks, so be it!
-Mensagem original-
De: Tim Streater [mailto:t...@clothears.org.uk]
Enviada em: terça-feira, 2 de outubro de 2012 08:37
Para: PHP General List
Assunto: [PHP]
3 matches
Mail list logo