Log in

View Full Version : How do I make an "if not" code statement?


Tim Skellett
05-13-2006, 11:23 PM
Sorry for the newbie question, but I have never coded PHP (or anything much).

I can see how to code an "if" statement, like so:
<if condition=".......

but how do I make an "if not" statement?

Many thanks in advance, and please do not throw brickbats, I already know I am a newb.

Hellcat
05-13-2006, 11:31 PM
$foo != $bar
this "translates" to "$foo is not equal to $bar", while "$foo == $bar" would be the "equals to" you used so far....

Can be used in PHP code as well as in the <if...> tags in templates.

Tim Skellett
05-14-2006, 08:38 AM
Many thanks, Hellcat!