<div class="form-group"> <label for="tag">标签</label> <select name="tag" value='{$result["tag"]}' class="form-control input-lg"> <option value="shenghuomiaozhao" <?php echo ($result["tag"]=="shenghuomiaozhao")?"selected":"" ?>>生活妙招</option> <option value="fenleijieshao" <?php echo ($result["tag"]=="fenleijieshao")?"selected":""?> >分类介绍</option> <option value="huanbaohudong" <?php echo ($result["tag"]=="huanbaohudong")?"selected":""?> >环保互动</option> <option value="huishouliucheng" <?php echo ($result["tag"]=="huishouliucheng")?"selected":""?> >回收流程</option> </select> </div>
This is an option type PHP library, the final effect. If you need it, you can directly download this php-option-master option type library
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
21 Oct 2021
php-toolkit/pflag is a general command line flag (option and parameter) parsing library written in PHP.
21 Nov 2016
PHP extension text processing - PCRE regular expression syntax 7 - internal option settings
20 Jun 2023
PHP form processing function example: option menu The option menu is a commonly used element in Web forms. The options menu allows the user to select a value from a series of predefined options. In PHP, we can use an associative array to define a menu of options, and then use a form processing function to handle the user-selected value. Here is a simple example code: <formmethod="POST"action="handle_form.ph
21 Jul 2016
List of php curl options (super detailed). Category 1: For the following optional parameters of options, value should be set to a bool type value: Option Optional value Remarks CURLOPT_AUTOREFERER When redirecting based on Location:
25 Jul 2023
PHP function introduction—curl_setopt(): Set a cURL option cURL is a powerful PHP extension for sending and receiving HTTP requests in code. When using cURL, various options can be set to configure the behavior and parameters of the request. Among them, the curl_setopt() function is a very important function in cURL. It is used to set options for the cURL session. Syntax The following is the syntax of the curl_setopt() function: boolcurl_
06 Jan 2017
open_basedir: restrict user-operable files to a certain directory
Hot Tools
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images