且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在单独的DIV中显示MySQL的每一行

更新时间:2023-12-04 09:56:22

最简单的方法是使用while函数创建div,该div显示您的帖子并向其中添加CSS类.

The easiest method of doing this is creating the divs from the while function that's showing your posts and adding CSS classes to them.

示例:

while ($post = mysqli_fetch_assoc($show_post)) {
echo '<div class="blue">';
echo $post["full_post"] . "<br />";
echo '</div>';
}