title: PHP Warning: Illegal string offset 'text'
body: <p>I keep getting the following error in PHP:</p>
  
  <blockquote>
    <p>[13-Jul-2019 06:49:43 UTC] PHP Warning:  Illegal string offset 'text'
    in
    /home/catchandreport/public_html/sweettune.info/LikeDislike/index.php
    on line 15</p>
  </blockquote>
  
  <p>Is there any way that I can replace my string with something else?</p>
  
  <p>I haven't tried anything yet. While I'm at it, this is a totally different problem, but in another line of code I get </p>
  
  <blockquote>
    <p>Illegal string offset 'id'</p>
  </blockquote>
  
  <p>Is there something I'm doing wrong that I can change?</p>
  
  <p>
      </p>
  
  <pre><code>  &lt;?php echo $post['text']; ?&gt;
    &lt;div class="post-info"&gt;
      &lt;!-- if user likes post, style button differently --&gt;
      &lt;i &lt;?php if (userLiked($post['id'])): ?&gt;
            class="fa fa-thumbs-up like-btn"
        &lt;?php else: ?&gt;
            class="fa fa-thumbs-o-up like-btn"
        &lt;?php endif ?&gt;
        data-id="&lt;?php echo $post['id'] ?&gt;"&gt;&lt;img src="catlogo.ico"&gt;&lt;/i&gt;
      &lt;span class="likes"&gt;&lt;?php echo getLikes($post['id']); ?&gt;&lt;/span&gt;
  </code></pre>