I'm running a script to redirect users based on country code, and right now the response I get is
Parse error: syntax error, unexpected ',' in /home2/mcp/public_html/redirect/index.php on line 15
This is line 15: $country_codes = 'US', 'CA', 'UK', 'AU', 'NZ', 'ZA', 'NL';
Used here:
if (in_array($var_country_code, array($country_codes))) {
When deleting line 15 and just adding it in where $country_codes sits right now, giving me:
if (in_array($var_country_code, array('US', 'CA', 'UK', 'AU', 'NZ', 'ZA', 'NL'))) {
it works fine.
Anyone that sees the error? If you need more code please let me know :)
Thanks!
Using the GeoIP plugin btw.