过滤以排除PHP的某些状态

I have a PHP script that accepts information about a customer including their address. I need to add a filter to the script that will look at the user's state and give an error if it is one of the states. The states are: AK, AZ, HI, and OR.

Below is an example of what you can do.

$customerState = "NJ";
$arrayOfStates = array("AK", "AZ", "HI", "OR"); //List of states

if(in_array($customerState,$arrayOfStates ))
{
  echo "This state is not supported";
}else
{
  exho "State supported!";
}