"if" statement

P

Prophet

I am new to webdesign and am looking for the correct way to do a "if"
statement.

Eg. if a>b then X, else Y

I can do this in excel, but have never done this in a web page - I know this
is so basic but it escapes me on how to do it.

Thanks,
 
L

long eddy

I am new to webdesign and am looking for the correct way to do a "if"
statement.

Eg. if a>b then X, else Y

I can do this in excel, but have never done this in a web page - I know this
is so basic but it escapes me on how to do it.

Thanks,

-----------------------
<?

if($a > $b)
{
print "x";
}
else
{
print "y";
}

?>
 
Top