Possible Duplicate:
php if statement with multiple conditions
$style = get_option('background_style');
if ($style == "option1") {
echo '<div class="background-style1">';
}
This is what I’ve got if I want “option 1” to echo the div class .background-style1, but I’m wondering how I could list more options after “option 1”.
I’ve tried this:
if ($style == "option1", "option2", "option3")
But it doesn’t work. What is the right way of doing this?
This is the most basic way to include multiple conditions in an if statement, you can also use other logical operators. for more info see here:
http://php.net/manual/en/language.operators.logical.php