Friday, November 16, 2012

Learning PHP - Else . . . Else If


Else

- executes a different statement only if the condition of if statement is FALSE


Else If

- executes a different statement if the condition of if statement is FALSE and only if the else if
   conditional expression is TRUE


       Else Program Sample:




                                     Output: ( prints the value of $b )




        Else If Program Sample:



                                     Output: ( prints the value of $c )




No comments:

Post a Comment

Popular Posts