Posted by Erwin Moller on 11/03/06 09:12
Michael Fesser wrote:
> .oO(David Gillen)
>
>>Nesting if's just leads to confusion in the long run.
>
> Not in properly structured and indented code. With some more braces the
> OP's code is perfectly readable without any comment.
>
> But I consider that personal taste.
I agree 100%.
Use {} everywhere to make things clear.
And also:
if (a==1 && b==2){
is a mess compared to:
if ((a==1) && (b==2)){
That are just a few extra () but makes the code completely clear and leaves
only 1 interpretation (for both PHP and humans who read the code).
Regards,
Erwin Moller
>
> Micha
Navigation:
[Reply to this message]
|