Разводящая страница
<?php
require "includes/config.php";
?>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title> <?php echo $config['title']; ?> </title>
</head>
<body>
<div id="wrapper">
<h1><?php echo $config['title']; ?></h1>
<?
$res = mysqli_query($connection, "SELECT id, idate , title, announce, content FROM news ORDER BY idate DESC LIMIT 5 ");
$data = mysqli_fetch_all($res, MYSQLI_ASSOC);
foreach ($data as $item) {
?>
<div class="post">
<span class="date"><?php echo date("d.m.Y", $item['idate']); ?></span>
<a class="title" href="/article.php?id=<?php echo $item['id'];?>"> <?php echo "  {$item['title']}"; ?></a></br>
<span class="announce"><?php echo "{$item['announce']} <br>";} ?></span></br>
</div>
</body>
</html>
Внутренняя страница
<?php
require "includes/config.php";
$post_id - $_GET['post_id'];
$sql = "SELECT * FROM news WHERE id = ".$post_id;
$post = mysqli_fetch_assoc($sql, MYSQLI_ASSOC);
foreach ( $post as $item) {
?>
<span class="content"><?php echo "{$item['content']} <br>";} ?></span></br>
сейчас выдает ошибки
Warning: mysqli_fetch_assoc() expects exactly 1 parameter, 2 given in C:\Programs\OpenServer\domains\test.ru\article.php on line 8
Warning: Invalid argument supplied for foreach() in C:\Programs\OpenServer\domains\test.ru\article.php on line 10