This question already has an answer here:
"Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\barangay\news-single.php on line 385"
line 385 is the last line of my program. I've already tried this codes in my other file but no errors occurs and when I've tried this code in my new file this error occurs. How to fix this problem. Please Help me. This is my codes.
<?php $query= mysql_query("select * from news where news_id = '$get_id'")or die(mysql_error());
$count = mysql_num_rows($query);
if ($count != '0'){
while($row = mysql_fetch_array($query)){
$id = $row['news_id'];
$news_location = $row['news_location'];
$news_date = $row['news_date'];
$news_author = $row['news_author'];
$news_title = $row['news_title'];
$news_description = $row['news_description'];
?>
<div class="blog-post-single content-row">
<div class="bb-image-wrap">
<img src="<?php echo $row['news_location']; ?>" alt="demo image">
</div>
<div class="meta-line">
<span class="post-date"><i class="icon-calendar"></i><?php echo $row['news_date']; ?></span>
<a class="more-link" href="#comment-list"><i class="icon-comment"></i>18 Comments</a>
<a class="more-link" href="#"><i class="icon-user"></i><?php echo $row['news_author']; ?></a>
</div>
<h2 class="post-heading"><?php echo $row['news_title']; ?></h2>
<p><?php echo $row['news_description']; ?></p>
</div>
<?php}}?>
Aucun commentaire:
Enregistrer un commentaire