I am writing one function for getting some different database query. Now things are going well but only need to get last directory name from defined path.
$q
$qa_path=explode('/', '/learnphp/docs/'); echo $qa_path[2]; // output docs