You wrote:
> additionally I also tend to always provide an alternative, especially
if dealing
> with nested ifs or loops, even if just a comment...  call it habit
(from where I
> don't know).
> if($condition){
> do this
> }else{
> # oops, $condition didn't exist
> }
> saves a hell of alot of time when going back through the code 6 months
> trying to remember what was being done where. personal opinion mind

It's a good idea.  The only problem is when you come upon a situation
where you don't want to do anything "else" at that point.  Where you
simply want to skip the rest of the if block if the condition isn't
true, and continue on with the rest of your script.  Then, using an else
isn't what you want to do.

 -Ryan :: ICQ - 595003 :: GigaBoard -

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to