Q:

How to show post based on id in url with PHP

I'm building a simple page where I list all posts on.
I'm a bit stuck because it's some time ago I made something like this.
I want to show the specific post when clicking the link. Here's an image of what I mean:

The blue 'title' is a url.
I don't know how to link this to another page, where the post with the id in the url is shown.
My link looks like this:
<a class="posts" href="http://example.com/blog/<?php echo $row['id']; ?>"><?php echo $row['titel']; ?></a>

This obviously gives a 'Not Found' error message.
How can I do this? It's kinda hard, because it's some time ago I worked with this.
NOTE: I am using a .htaccess file to delete the .php extension from the url. 
My urls look like: 

http://example.com/home/blog

etc.

A:

RewriteEngine on
RewriteRule ^blog/([^/\.]+)/?$ blog.php?id=$1 [L]

Here, assuming your blog.php takes $_GET['id'], having the above in your .htaccess will route 
/blog/69 to blog.php?id=69

