当没有子帖子时,我需要它来删除带有h3标签"responses to this with“的div。它在前面的div中显示为一个段落。有什么想法吗?我尝试添加一个ifelse语句,其中have_posts() = 0)。到目前为止,这还没有奏效。 <?php if ($count = $child_query->have_posts() > 0)
我正试着用CSS设计一些DIV的样式。我想做的是用PHP改变MySql循环中的DIV tag类。$result = $mysqli->query("SELECT * FROM posts ORDER BY id DESC LIMIT 0, 20");<div class=” box id1”><?php echo $row[‘post’];?>&