Hi, all
I tried to set a default value on a 'select' object. Anyway, it seems the 'if' always return false. No one option is selected as I traced it. And I'm pretty sure there should be one value equals to the terms. Please help!
[PHP]<tr>
<td>Terms:</td>
<td><SELECT style="width:100%" id="terms">
<?php foreach($tes_terms as $desc => $val):?>
<?php if($terms == $val):?>
<?php $_my_selected = 'selected';?>
<?php else:?>
<?php $_my_selected = '';?>
<?php endif;?>
<?php echo "<option value='$val' $_my_selected> $desc</option>";?>
<?php endforeach;?>
</SELECT></td>
<td class="err_red"></td> [/PHP]
jack