答案 0 :(得分:1)
你的报价搞砸了。
变化:
$v = "<?php if($test== 'lala' || $test== 'kaka'){echo selected='selected';}?>";
$b = "<?php if($test== 'tada' || $test== 'sada'){echo selected='selected';}?>";
要:
<option <?php if($test== 'lala' || $test== 'kaka'){echo 'selected=selected';}?> value="lala">lala</option>
<option <?php if($test== 'tada' || $test== 'sada'){echo 'selected=selected';} ?> value="tada">tada</option>