asdsad
2772 단어 SAD
- function search() {
- $key = $_GET['key'];
- if(!emptyempty($key)){
- $Model = new Model();
- $list = $Model->query("select * from base_article where `title` LIKE '%".$key."%'");
- if ($list){
- foreach ($list as $k=>$v) {
- $red = "<b>$key</b>";
- $list[$k]['title'] = str_replace($key, $red, $v['title']);
- }
- }
- $this->assign("list",$list);
- }
- $this->display();
- }