I use a glob function to list a folder items, the code below give me text like this "flash/movies", but I would like to trim the url to display only "movies". Can you help me what should I do ?
$dir = glob("flash/*");
usort($dir, function($a, $b){
return filemtime($a) < filemtime($b);
});
foreach ($dir as $plk) {
echo '<h4>' . $plk . '</h4>';
}