Home > Backend Development > PHP Problem > How to modify select in php

How to modify select in php

藏色散人
Release: 2023-03-09 06:04:01
Original
2001 people have browsed it

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.

How to modify select in php

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
How to modify select in php

Fixed value to get the default value

How to modify select in php

<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>
Copy after login

value is not a numerical method

How to modify select in php

//$list为后台查到渲染到前端的值<select>
		<foreach>
			<option>
			value="{$vo.id}">{$vo.mingcheng}</option>
		</foreach></select>
Copy after login

[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!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template