$url =”$_SERVER[‘REQUEST_URI’]”; or $url=”https://ephptutorial.wordpress.com/category/internal-messaging-system-in-codeigniter/”; $path = $url); $newpath = $path[‘path’]; $new = explode(‘/’,$newpath); echo $new[2];// Result: category
$url =”$_SERVER[‘REQUEST_URI’]”; or $url=”https://ephptutorial.wordpress.com/category/internal-messaging-system-in-codeigniter/”; $path = $url); $newpath = $path[‘path’]; $new = explode(‘/’,$newpath); echo $new[2];// Result: category