【发布时间】:2020-08-15 04:50:39
【问题描述】:
<select name='month'>
<option value="">Select Month</option>
<option value="january" <?php if(isset($fetch['bill_month']=="January")){ echo "selected"; }
?>>January</option>
<option value="february">February</option>
<option value="march">March</option>
</select>
【问题讨论】:
-
试试这个,
@if(isset($fetch['bill_month'])) @if($fetch['bill_month'] == "January") selected @endif @endif -
永远不要使用@来抑制错误!!!!!!!!!!!!!!!!!!!!!!!!
标签: php mysql laravel codeigniter