public/images/portfolio/i-vis/1.jpg
How could i remove all the path regardless of what the filename is using php?
alternative solution. Just a bunch of explodes
$str='public/images/portfolio/i-vis/1.jpg'; $s = end(explode("/",$str)); print "filename " . $s."\n"; $e = explode(".", $s ); print "without extension: $e[0]\n";