Get url-friendly version of the_title?

How can I get an url-friendly version of the post_title? I´m using anchor links for my posts on an archive page, and for the moment the posts get the post_ID as a hash tag but I would like to get the title instead as it would look nicer.

Related posts

Leave a Reply

2 comments