Home >Backend Development >PHP Tutorial >Some notes on CI framework

Some notes on CI framework

WBOY
WBOYOriginal
2016-07-29 09:00:28824browse

Use the data obtained from the database when entering the View layer to determine whether the select is displayed to achieve the default selection goal

<select name="data[stat]">
                                <option value="0" <?php if(isset($data[&#39;stat&#39;]) && $data[&#39;stat&#39;] == 0 && $data[&#39;stat&#39;] != &#39;&#39;) : echo &#39;selected="selected"&#39;; endif;?>>下线</option>
                                <option value="1" <?php if(isset($data[&#39;stat&#39;]) && $data[&#39;stat&#39;] == 1 && $data[&#39;stat&#39;] != &#39;&#39;) : echo &#39;selected="selected"&#39;; endif;?>>正常</option>
                                <option value="2" <?php if(isset($data[&#39;stat&#39;]) && $data[&#39;stat&#39;] == 2 && $data[&#39;stat&#39;] != &#39;&#39;) : echo &#39;selected="selected"&#39;; endif;?>>删除</option>
                            </select>

The above introduces some notes on the CI framework, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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