获取行并爆炸 - PHP mySQL

Here is my code:

$postsql = "SELECT * FROM post WHERE id='{$_GET['id']}'";
$posts = mysqli_query($connect,$postsql) or die("Error: ".mysqli_error($connect));
$post = mysqli_fetch_array($posts);

$postAuthor = $post['author'];
$postDate = $post['date'];

$postCat = mysqli_fetch_row($post['cat']);// I've tags here separated by commas.
$postCatTag = explode(",",$postCat);

$postText = $post['text'];

echo "<img class='view_newsimg' src='{$postImg}'>
<h3 class='lath'>{$postTitle}</h3>
<ul class='det'><li class='adc'>avtori: {$postAuthor}</li>
<li class='adc'>TariRi: {$postDate}</li>
<li class='adc'>kategoria: <a href='#'>{$postCatTag}</a></li>"; // tags are shown here
echo <<<TEXT
<p class="news">{$postText}</p>
TEXT;

As a result for tag section in browser it displays: kategoria: Array instead of displaying tags from table. Why? How can get desired result?

$postCatTag is an array. Array to string conversions always results in Array. You could use the implode-function to impode an array with a given seperator:

implode(', ', $postCatTag);

Or you can just use $postCat since that is already a string (tags seperated by ',').

$postCatTag is an array. Arrays cannot be displayed by echo.

Use loop for this:

for($i=0;$i<count($postCatTag),$i++){

  echo "<li class='adc'>kategoria: <a href='#'>$postCatTag[$i]</a></li>";  

}
    echo "<li class='adc'>kategoria:'; 
    for($i=0;$i<count($postCatTag),$i++)
    {

              echo "<a href='#'>$postCatTag[$i]</a>";  

    }
    echo "</li>";

Hope it will work for you.