Use this tag within <cfif> tags and optionally, together with other <cfelseif> tags and a final <cfelse>.

<cfelseif> lets you create compound conditional statements in CFML.

The <cfelseif> tag will handle cases not handled by the original <cfif> or preceding <cfelseif> tags.

The value in the <cfelseif> tag can be any expression.

This tag cannot have a body.

This tag is also supported within <cfscript>

<cfelseif #boolean condition#>
Attribute Description
boolean, optional

Expression condition


Tag format

<cfif isArray(SERVER)>
	<cfset result="It is in Array format">
	<cfset result="It is in Structure format">
	<cfset result ="Other than struct & Array">
<cfdump var="#result#" />

Script format

//script format
	if(numb gt 1){
		writeOutput("It is greater than 1 ");
	}else if(numb eq 1){
		writeOutput("It is equal to 1 ");
		writeOutput("It is not greater than or equal to 1 ");

See also