while (list($key, $RegID) = each ($AvailableRegtypes)) { }