use an associative array to check for isset instead of scanning an array for values