code/Utilities.php
public static function getValidKey($pattern, $arr) {
        $keys = array();
        foreach($arr as $key => $value) {
            if (preg_match($pattern, $key)){
                $keys[] = $key;
            }
        }

        return $keys;
    }
public static function getValidKey($pattern, $arr) {
        $keys = array();
        foreach($arr as $key => $value) {
            if (preg_match($pattern, $key)){
                $keys[] = $key;
            }
        }

        return $keys;
    }
public static function getValidKey ( $ pattern , $ arr ) { $ keys = array ( ) ; foreach ( $ arr as $ key => $ value ) { if ( preg_match ( $ pattern , $ key ) ) { $ keys [ ] = $ key ; } } return $ keys ; }
find the key that matches a specific pattern.
Used primarily with dbo field tags.

e.g. UtilityFunctions::getValidKey('/*Description/', $this->db);
find the key that matches a specific pattern . Used primarily with dbo field tags .