Question: I retrieved data from MySQL but the result is like this: <http://sparrow.site90.net/select.php>

It shows the word `(Array)` before the retrieved information. I tried so hard to remove this word from the table but I could not.

Here is my code. What can I do about it?

```
echo "<td>" . $array = unserialize($row['Favorite_courses']);
foreach($array as $item) {
    echo $item, ", ";
}
echo "</td>";

```

Answer: 
You are concatenating and echoing your array:

```
echo "<td>" .  $array= unserialize($row['Favorite_courses']) ;

```

should be:

```
$array = unserialize($row['Favorite_courses']);
echo "<td>";

```
A better code will be something like this:

```
$array = unserialize($row['Favorite_courses']);
echo "<td>".implode(",",$array)."</td>";

```

In the snippet above, the implode method will neatly insert commas in between the array values and echo a concatenated string of Favorite courses separated by comma.

Read the documentation here: [PHP - implode function](http://php.net/manual/en/function.implode.php)