I have been finding myself doing URLs like this:
$link = base_url('post') . '/' . $post_id . '/' . $slug . '/page/' . $page_num;
To form http://example.com/post/10/some-post-name/page/1
Needless to say, it's pretty messy, but I can't think of an alternative? Is there a better way write links with variables in it?
I am using Codeigniter as a framework if there is a solution involving it.