The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › PHP – Remove anything after the last / › Re: PHP – Remove anything after the last /
$string = '/tralala/bleh'; $plorp = substr(strrchr($string,'/'), 1); $string = substr($string, 0, - strlen($plorp));