lundi 27 juin 2016

Comparison operator not working in if statement PHP

This below is printing hello even though the statement is false

$Originating_country_region = $country_region[$i]['region'];      // value of var is AM after assigning
$order_shipping_country_region = $country_region[$i]['region'];   // value of var is EU after assigning

if(isset($Originating_country_region) == "EU" && isset($order_shipping_country_region) == "EU")
{
 echo "Hello";
}

Aucun commentaire:

Enregistrer un commentaire