Slightly better syntax of previous commit.

This commit is contained in:
Znote 2015-11-03 20:41:32 +01:00
parent a29f3e93f5
commit a23b38090d

View File

@ -136,15 +136,19 @@ if (isset($_GET['success']) && empty($_GET['success'])) {
<!-- Available towns to select from when creating character --> <!-- Available towns to select from when creating character -->
Town:<br> Town:<br>
<select name="selected_town"> <select name="selected_town">
<?php foreach ($config['available_towns'] as $tid) { ?> <?php
foreach ($available_towns as $tid):
?>
<option value="<?php echo $tid; ?>"><?php echo town_id_to_name($tid); ?></option> <option value="<?php echo $tid; ?>"><?php echo town_id_to_name($tid); ?></option>
<?php } ?> <?php
endforeach;
?>
</select> </select>
</li> </li>
<?php <?php
else: else:
?> ?>
<input type="hidden" name="selected_town" value="<?php echo end($config['available_towns']); ?>"> <input type="hidden" name="selected_town" value="<?php echo end($available_towns); ?>">
<?php <?php
endif; endif;