Home > Backend Development > PHP Tutorial > PHP gets the data from the database and assigns it to the drop-down box

PHP gets the data from the database and assigns it to the drop-down box

WBOY
Release: 2016-07-25 08:47:26
Original
1497 people have browsed it
  1. Code in Action
  2. public function add(){
  3. $node=M('Menu');//Instantiate the database
  4. $this->lists=$node->where(array('higher '=>0))->select();//The values ​​filtered out according to the conditions are given to lists
  5. $this->display();
  6. }
  7. template industry code
  8. //PS: Manually typed code, there may be errors in the middle
Copy the code


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