How to modify select in php: first open the corresponding code file; then find the select statement; finally modify the content such as "" can be used.
The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer
php drop-down box modification to obtain the default value
The most troublesome thing when we are doing add, delete, modify and check is that the drop-down box has been modified. For a novice like me It’s very uncomfortable for me
When we make functions, we have to add any modifications for the user experience. I won’t go into details. Just go to
Fixed value to get the default value
<select> <option>selected> 0 </option> <option>selected> 1 </option> <option>selected> 2 </option> <option>selected> 3 </option> <option>selected> 4 </option> <option>selected> 5 </option> <option>selected> 6 </option> <option>selected> 7 </option> <option>selected> 8 </option> <option>selected> 9 </option> <option>selected> 10 </option> <option>selected> 11 </option> <option>selected> 12 </option></select>
value is not a numerical method
//$list为后台查到渲染到前端的值<select> <foreach> <option> value="{$vo.id}">{$vo.mingcheng}</option> </foreach></select>
[Recommended learning: PHP video tutorial】
The above is the detailed content of How to modify select in php. For more information, please follow other related articles on the PHP Chinese website!