下面的这个选择框在提交表单后会记住并突出显示 -one- 选择。但是当我将其设为多个时,它不会在提交后突出显示任何选择。关于如何实现这一目标的任何想法?
提前致谢。
<?php
$options_amount = array("0","1","2","3","4","5","6","7","8","9","10+");
$no_way = $_GET['no_way'];
?>
<select class="postform" name="no_way[]" multiple size="5">
<option <?php if ($no_way == 'all') { ?>selected="selected"<?php }?> value="all">Any</option>
<?php
foreach ($options_amount as $option) {
?><option <?php if ($no_way == $option) { ?>selected="selected"<?php }?> value="<?php echo $option; ?>"><?php echo $option; ?></option><?php }?>
</select>