PHP vs ColdFusion/IF Statements

PHP IF STATEMENT

The conditions are based on the information you want to compare.

So let's assume you want to compare apples to oranges, to see if they are the same.

Now assume that you want to return an answer even if the conditions are not met. You would use what is called an else statement which looks as follows.

ColdFusion is very different in its comparisons. They look as follows

If you notice that it's more of a <> based instead of a structure based. This can be an easier transition for HTML developers as it is tagged based

Now to return an alternate or else you do the almost exact same thing as in PHP, but it looks like this: