Forum Moderators: coopster
So far, this part of the code is working well allowing one country:
if ($visitor_country_name == "France") {
include("index.html");
} else {
include("sorry.html");
}
But I want to allow more countries. Can I just add them, separated by a comma as in the following example, or is there some other correct syntax?
if ($visitor_country_name == "France, Belgium, Germany") {
include("index.html");
} else {
include("sorry.html");
}
TIA
$badctryarr = array('France', 'Belgium', 'Germany');
if (in_array($visitor_country_name,$badctryarr)) {
etc