Using article headline as link id

Hi, i have a blog post that i would like to use as the id for a link, as at the moment the db id is used (/site/news/54) and url’s are not very seo friendly. I am wondering the best way to encode characters in the title to make it url friendly, as some of the titles have characters the could mangle a url, for instance:
New Product; Top&Tails reviewed as “Best New Product” by Wilson’s Monthly
…would i just str_replace the spaces to underscores, then htmlentitiy the rest? Or use urlencode?

What’s the best way of getting friendly urls using article titles?

(Just to clarify, there will be many articles on one page).

What your describing is commonly referred to as a ‘slug’. A quick search for PHP slug should put you on the right track, feel free to ask more though if you’re stuck.

Search this forum for ‘slug’ too and you will turn up some discussions.