0
我目前拥有的代码是:如何防止输出html标签?
<h2 id="comment_title">vistor comments</h2>
<div class="count">
<?php
$count = comment_num($nid);
if($count>0){
echo $count'comments';
} else {
echo '';
}
?>
</div>
现在,我想知道如何改变上面的代码来获得这样的效果:
当$count > 0
,它应该输出HTML标签,可以使用一些CSS风格。
<h2 id="comment_title">vistor comments</h2>and $count'comments';
当$count <= 0
时,不输出html标签。并且不要使用任何CSS样式。
<h2 id="comment_title">vistor comments</h2> ;
`如果($计数> 0){//这里把所有的东西你想呼应}`` – 2011-02-12 07:34:01