این دستورات رو بذار قبل از حلقه:
echo '<table dir="rtl" border="1">';
echo '<tr><th>عملیات</th><th>عنوان</th><th>متن</th></tr>';

اینم بذار داخل حلقه:
echo "<tr>";
$id=$row['id'];
echo '<td><a href="update.php?id='.$row['id'].'"><img src="edit.gif"></a></td>';
$title=$row['title'];
echo "<td>$title</td>";
$msg=$row['msg'];
echo "<td>$msg</td>";
echo "</tr>";

اینم بذار بعد از حلقه:
echo "</table>";