$bandgroup) {
$groupKey = strtoupper($key);
// Collect VHF, UHF, SHF for later grouping
if (in_array($groupKey, ['VHF', 'UHF', 'SHF'])) {
$vhfUhfShfButtons[$groupKey] = $groupKey;
} else {
// MF and HF bands get individual buttons in their own groups
echo '
';
foreach ($bandgroup as $band) {
$bandId = str_replace('.', '', $band); // Remove dots for ID (e.g., 2.5mm -> 25mm)
echo '';
}
echo '
' . "\n";
}
}
// Output VHF/UHF/SHF as one button group
if (!empty($vhfUhfShfButtons)) {
echo '