Jump to content

[SOLVED] Quick 'if else' statement question


Tovin

Recommended Posts

Alright, I've written a script with an IF and ELSE statement and I was wondering if there was a way to make two IF variables.

 

What I'm trying to get my script to do is this:

 

Read two columns and if either of those are true then echo one thing or else echo something different.

 

Is there some sort of OR statement?

 


if ( $variable1 == 0 or $variable2 == 10)
{
echo "blah here.";
} else {
echo "other stuff.";
}

 

I hope that makes sense.  I know that the code above doesn't work, I was just wondering how to make it.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/86087-solved-quick-if-else-statement-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.