$news = $_GET['id'];
$mysqli = mysqli_connect('localhost', 'weltkind', '123321', 'wl_db');
$sql = "SELECT
n.id AS news_id,
n.title AS title,
n.content AS content,
u.id AS user_id
FROM news n
LEFT JOIN users u
ON n.user_id = u.id
WHERE n.id = $news LIMIT 1
";
$query = mysqli_query($mysqli, $sql);
$row = array();
$row = mysqli_fetch_assoc($query);
echo '<div>';
echo '<h1><a href="news.php?id='.$row['news_id'].'">'.$row['title'].'</a></h1>';
echo '<p>'.$row['content'].'</p>';
echo '</div>';
$i = 0;
while ($row = mysqli_fetch_assoc($result)) {
echo '<div class="item_news">';
echo '<h1><a href="news.php?id='.$row[$i]['id'].'">'.$row[$i]['title'].'</a></h1>';
echo '<p class="content">'.$row[$i]['content'].'</p>';
echo '<p class="add_date">'.$row[$i]['add_date'].'</p>';
echo '<p class="user_id">'.$row[$i]['user_id'].'</p>';
echo '</div>';
$i++;
}
<div class="container"
<div class="block-news">
<?
$result = mysql_query(" SELECT * FROM news ORDER BY id DESC");
mysql_close();
while($row = mysql_fetch_assoc($result)): ?>
<div class='item_news' style='margin-bottom: 15px;'>
<h1><?= $row['title']?></h1>
<p class="text"><?= $row['text']?><p>
<p class="date">Дата публикации: <?= $row['date']?></p>
<p class="time">Время публикации: <?= $row['time']?></p>
<p class="author">Автор: <?= $row['author']?>
</div>
<?php endwhile
?>
</div>
</div>
<?php while ($row = mysql_fetch_assoc($result)): ?>
<h1><?= $row['title'] ?></h1>
<p><?= $row['text'] ?><p>
<p>Дата публикации: <?= $row['date'] ?></p><p><?= $row['time'] ?></p>
<p>Автор: <?= $row['author'] ?>
<?php endwhile ?>
я сам знаю то что ошибка в чемВ золотой фонд.