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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-25 08:47:261542browse
  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


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
Previous article:Redis creates instanceNext article:Redis creates instance