cfelseif

Used as a control block in a cfif tag block to handle any case
not identified by the cfif tag or a cfelseif tag.

 <cfelseif>

 else if (expression) { }

Examples sample code using the cfelseif tag


Script Syntax

count = 10; 
 if (count > 20) { 
 writeOutput(count); 
 } else if (count == 8) { 
 writeOutput(count); 
 } else { 
 writeOutput(count); 
 }

Tag Syntax

<cfset count = 10> 
 <cfif count GT 20> 
 <cfoutput>#count#</cfoutput> 
 <cfelseif count EQ 8> 
 <cfoutput>#count#</cfoutput> 
 <cfelse> 
 <cfoutput>#count#</cfoutput> 
 </cfif>

Fork me on GitHub