这个是模块代码
if($article_info['grouptime']){
$otherTitle = $this->model('publish')->getall("article","grouptime='".$article_info['grouptime']."' AND grouptime!=''");
}else{
$otherTitle = array();
}
我想通过php中的if语句来判断,当当前文章的grouptime这个字段值的相同数据大于1时就显示
这个代码
相关百科
,否则就显示【没有百科】,要怎么写if 跟 else呢?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这样可以查出数据库中grouptime重复数大于1的数据
php代码
==============================================================
在第二段代码前面加上if判断