Re: multiples ifs



Nikos wrote:

Here is hwo i made it aget your suggestion:

<code snipped>

but still not good enouph.

Why not? Does it do what you want it to do? If not, what is it doing that is different than what you expect?


I really dont liek the use of $i.

I think your use if $i is fine. You need some way of knowing whether an error was encountered. $i serves that purpose. You may want to use a more descriptive name such as $error_found.


I think there must me a smarter way of writing this.

I think it is fine. I would probably do something very similar if I wrote it.
.