php remove character from string after a characer code example
Example: php remove everything after character
$fullpath = 'folderName/file.ext';
$folder = substr($fullpath, 0, strpos($fullpath, '/'));
echo $folder;
// Output => folderName
$fullpath = 'folderName/file.ext';
$folder = substr($fullpath, 0, strpos($fullpath, '/'));
echo $folder;
// Output => folderName