You can save a bunch of code by creating an array of your values and looping through them. When looping through them, you can do a check if your value matches your POST data.
arr = ['A','1','x','y','z'];
foreach ($arr as $val){
if($searchType === $val){
$sel = 'selected';
} else { $sel = '';};
echo "<option value="".$val."" ".$sel.">".$val."</option>";
};
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…