I've searched but can't find a solution that works.
I have the following code - how can I ensure that the output is sorted alphabetically by $location["title"] ?
    <?php foreach($countries as $country): ?>
<option value="<?php $country["title"] ?>"><?php esc_html_e($country["title"]) ?>
    <?php endforeach; ?>
Many thanks
 
     
    