Cant fetch post from SQL Database
<p>Hello i'm trying to get the data from my sql with is the id,    post_author,    post_date,  post_content,   post_title &amp;    post_status</p>

<p>Right now my basic for the post.php is this </p>

<pre><code>&lt;?php require_once("../../includes/session.php"); ?&gt;
&lt;?php require_once("../../includes/db_connection.php"); ?&gt;
&lt;?php require_once("../../includes/functions.php"); ?&gt;
&lt;?php
$post = "";
$id = 1;
// ^'will be using $_GET['id'] to get current post
find_post_by_id($id, $public=true);
?&gt;
&lt;?php include("../../includes/layouts/header.php") ?&gt;

&lt;div class="container post"&gt;
    &lt;h1&gt;&lt;?php echo htmlentities($post["post_title"]); ?&gt;&lt;/h1&gt;
    &lt;p&gt;Auther &amp; postdate n time&lt;/p&gt;
    &lt;hr class="hrpost"&gt;
    &lt;div class="content"&gt;
        Content in form of the text
    &lt;/div&gt;
&lt;/div&gt;

&lt;?php include("../../includes/layouts/footer.php") ?&gt;
</code></pre>

<p>and in functions.php i have this </p>

<pre><code>function confirm_query($result_set) {
    if (!$result_set) {
        die("Database query failed.");
    }
}

function find_post_by_id($post_id, $public=true) {
    global $connection;

    $safe_page_id = mysqli_real_escape_string($connection, $post_id);

    $query  = "SELECT * ";
    $query .= "FROM posts ";
    $query .= "WHERE id = {$safe_page_id} ";
    if ($public) {
        $query .= "AND post_status = \"publish\" ";
    }
    $query .= "LIMIT 1";
    $post_set = mysqli_query($connection, $query);
    confirm_query($post_set);
    if($post = mysqli_fetch_assoc($post_set)) {
        return $post;
    } else {
        return null;
    }
}
</code></pre>

<p>and then when im trying to get it its saying -></p>

<blockquote>
  <p>Warning: Illegal string offset 'post_title' in D line 13.</p>
</blockquote>

<p>Why do it do that and how to i fix it ???</p>