• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 14. Conditional Logic Problems a... > Using CFIF, CFELSEIF, and CFELSE

Using CFIF, CFELSEIF, and CFELSE

The most commonly used conditional logic element is known as an if-then-else block. It is used to evaluate an expression and execute the code inside its main block if the expression evaluates to a true value.

CFML provides the CFIF tag for this task. The basic format of the CFIF tag is as follows:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint