$aryValues) if($intCountryId == $aryValues['CountryId']) $aryZonesToReturn[$intZoneId] = self::$NameArray[$intZoneId]; return $aryZonesToReturn; } /** * Return the id for a Zone by its name * @param string strName - name for the zone * @return integer - the id of the given zone or ZoneType::NoZone */ public static function GetId($strName) { $intToReturn = self::NoZone; if(empty($strName)) return $intToReturn; //look for exact match foreach( self::$NameArray as $intId => $m_Name ) if( strtolower( $m_Name) == strtolower( $strName ) ) { $intToReturn = $intId; break; } //check for abbreviations .. if($intToReturn == self::NoZone) foreach( ZoneType::$ExtraColumnValuesArray as $intId => $aryInfo ) { $strCode = $aryInfo['Code']; if( strtolower( $strCode) == strtolower( $strName ) ) { $intToReturn = $intId; break; } } //look for partial match .. if($intToReturn == self::NoZone) foreach( self::$NameArray as $intId => $m_Name ) if( false !== stripos( $m_Name, $strName ) ) { $intToReturn = $intId; break; } return $intToReturn; } } ?>