在这个php循环中集成这个html?"/>
php在html中写循环,如何在这个php循环中集成这个html?
我有这个PHP代码,我试图与下面的HTML布局集成,但我无法弄清楚,PHP
代码获取所有状态发布并按顺序显示它们,但它会显示与状态发布关联的所有注释,以便状态发布可能具有
0评论或它可能有多个评论。
如果您阅读我在PHP代码中留下的注释以及我在html中留下的注释,您将看到我面临的问题
我需要以某种方式将注释放在状态发布的表格单元格中
在下面的图片中,有1个状态帖子和3个关于该帖子的评论,我想要做的是让评论显示在自己的表格中,该表格将嵌套在状态帖子右侧的右侧。因此,在顶部的状态帖子中,您会在该帖子的底部看到一个表格边框,该边框应该低于该帖子的最后评论,希望现在更有意义
alt text .jpg
$last_id = 0;
echo '
while ($row = mysql_fetch_array($res)) {
//start output of new status post and comments
if ($row['0'] != $last_id) {
echo 'status post stuff'
}
//start output of new status post and comments
//output comment here
$last_id = $row['0'];
if($row['commentid'] != ''){
echo 'status COMMENT for above status post'
}
//END output comment here
}
echo '
';?>
so and so said blah blah blah @ wee hours of the moring!
|
更多推荐
php在html中写循环,如何在这个php循环中集成这个html?
发布评论