<?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{?>
<?}?>
两种写法都可