If Statement





The syntax of if statement:
if(CONDITION){
#code block executed
#if condition is true.
}else{
#code block executed
#if condition is false.
}
Sometimes you need to choose from multiple statement blocks, such as when you need to execute a different statement block for each month. You use the if...elseif statement for this type of decision. The if..elseif has this syntax:
if(CONDITION-ONE){
#code block executed
#if condition one is true.
}elseif(CONDITION-TWO){
#code block executed
#if condition two is true.
}{
else{
#code block executed
#if condition is false.
}
Domain Name Search
|