There are two dropdown lists for selecting countries. "From" and "to". How to make it so that when you select any country in a drop-down list, a country with id = 220 is automatically added to the second drop-down list. And back. When replacing the value in the second drop-down list (with id = 220) with another one, the first drop-down list contains the country with id = 220. Please help.
<div class="home-main-block-data_right"> <div class="form-group"> <p>Откуда</p> <table class="tb_m"> <tr> <td>Страна</td> <td class="form-group_item"> <select onchange="calc();" id="country-from" name="country-from"> <?php foreach(Calc_zones::getCountriesListForSelectByLang(LANG) as $country){ ?> <option <?php if($country['id'] == 220){ ?>selected<?php } ?> value="<?=$country['id']?>"><?=$country['title']?></option> <?php } ?> </select></td> </tr> </table> <p>Куда</p> <table class="tb_m"> <tr> <td><label for="country-from" style="font-weight: 100"><?=__('lng.calc.country', 'Страна')?></label></td> <td class="form-group_item"> <select onchange="calc();" id="country-in" name="country-in"> <?php foreach(Calc_zones::getCountriesListForSelectByLang(LANG) as $country){ ?> <option <?php if($country['id'] == 223){ ?>selected<?php } ?> value="<?=$country['id']?>"><?=$country['title']?></option> <?php } ?> </select></td> </tr> </table> </div> </div>