-1
我的文章都出現了這樣的:如何顯示由CMS創建的PHP文章並排?目前
1:article
2:article
我希望他們能夠顯示這樣的:
1:aritcle 2:article.
這裏是我的代碼:
<?php
include ("connect.php");
$query = "select * from posts order by 1 DESC LIMIT 0,5";
$run = mysql_query($query);
while ($row = mysql_fetch_array($run)) {
$post_id = $row['post_id'];
$title = $row['post_title'];
$image = $row['post_image'];
$content = substr($row['post_content'],0,40);
?>
<a href="pages.php?id=<?php echo $post_id; ?>">
<h3><?php echo $title; ?></h3></a>
<a href="pages.php?id=<?php echo $post_id; ?>">
<img src='images/<?php echo $image; ?>' width='120' height='70' border="1">
</a>
<a href="pages.php?id=<?php echo $post_id; ?>">
<p><?php echo $content; ?></p></a>
<hr></hr>
<?php } ?>
在while循環結束時寫下<?php echo「。」;?> – KinjalMistry