为什么这句无效?:<?php if ($this->tags != 'abc'): ?> //abc是标签的缩略名
反而这句判断分类的却可以?:<?php if($this->category != 'abc'): ?> //abc是分类的缩略名
我是想从首页中排除含有某一标签的文章,请问该怎么写?求大神指教!谢谢!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
分类和标签都是一个数组,最好用
<?php if( in_array('abc', $this->tags) ): ?>判断