function typeid($field, $value) { global $TYPE; return $TYPE[$value]['name']; }