I seem to be having a mysterious problem with the use of OR or || in a PHP if statement. My code is this:
if ($region=='ibiza' || 'mallorca' || 'menorca' || 'andalucia' || 'basque' || 'cataluna' || 'centralspain' || 'greenspain' || 'pyrenees' || 'rioja' || 'valencia') {
$GoTo = "/spain/".$region.".php";
}
No matter what value I give to $region, $GoTo always comes out as /spain/$region.php ie the first if loop always evaluates as "true". There are other ways I could do this, but I don't see why this method doesn't work.