title: How to fix "Warning: illegal string offset"
body: <p>Previously I tried translating the php pdo code to my php version, but I got a problem like this. <strong>"Warning: Illegal string offset 'tagName' in..."</strong>. Can someone help me, what should i do? i dont know basic code.</p>
  
  <p>PDO Version:</p>
  
  <pre><code>$stmt2 = $db-&gt;prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID');
  $stmt2-&gt;execute(array(':postID' =&gt; $row['postID']));
  $catRow = $stmt2-&gt;fetchAll(PDO::FETCH_ASSOC);
  $links = array();
  foreach ($catRow as $cat)
  {
  $links[] = "&lt;a href='c-".$cat['catSlug']."'&gt;".$cat['catTitle']."&lt;/a&gt;";
  }
  echo implode(", ", $links);
  </code></pre>
  
  <p>My Php:</p>
  
  <pre><code>  $check_tag = mysql_query("SELECT tagName, tagSlug FROM tb_tags, tb_tag_posts WHERE tb_tags.tagID = tb_tag_posts.tagID AND tb_tag_posts.postID = '".$post['postID']."'") or die(mysql_error());
    $tagRow = mysql_fetch_assoc($check_tag);
    $tag_links = array();
    foreach($tagRow as $tag){
      $tag_link[] = "&lt;a href=''&gt;".$tag['tagName']."&lt;/a&gt;";
    }
    echo implode(", ", $tag_link);
  </code></pre>
  
  <p>I need to create like this: <strong>tag-1, tag-2</strong></p>