帝国cmsphp判断字段值是否为空并且字段值a=字段值b而显示不同的内容
<?phpif(!empty($navinfor[yi]and$navinfor[yi]!=$navin...
<?php if(!empty($navinfor[yi] and $navinfor[yi] != $navinfor[newstext])):?>
<a class="translate">译</a>
<?php endif;?>
<?php if($navinfor[yi] != '' and $navinfor[yi] != $navinfor[newstext]){?>
<a class="translate">译</a>
<?}else{?>
<?}?>
两种写法都可
<a class="translate">译</a>
<?php endif;?>
<?php if($navinfor[yi] != '' and $navinfor[yi] != $navinfor[newstext]){?>
<a class="translate">译</a>
<?}else{?>
<?}?>
两种写法都可