my projects is almost done.but i just need a Seo friendly url for my projects my current url is
http://localhost/example/product/category/1
I want to convert this url into this
http://localhost/example/product/category/name-of-category
pls help guys
You need to use something like slug
public function category($slug)
{
$query = $this->db->get_where('posts', array('slug' => $slug), 1);
// Fetch the post row, display the post view, etc...
}
Use dashes to separate words
$slug = url_title($title, 'dash', true);
you need to take care for this slug to be unique :)