Alright, I have my urls set up to rewrite "news_item.php?id=1" to "blog/1/Title-of-post".
This works great apart from when a title has numbers at the start for example "blog/23/12-days-to-go" it can't find the right id.
Here's how I have it setup, maybe someone can make sense of it.
Rewrite rules
RewriteRule ^blog/([0-9]+)/([a-z-]+)/$ ./news_item.php?id=$1&t=$2
RewriteRule blog/([[0-9]+)/([a-z-]+) news_item.php?id=$1&t=$2
Get ID from url
$id = intval($_GET['id']);
Then I just use
`WHERE `id`=$id`
as my query
Link used
/blog/$id/$title/
So it works fine apart from when there is a number at the start of the title, a number within the title is fine though. Can anyone suggest what to do?