Answers for "remove substring before a character in php"

PHP
3

php remove everything after character

$fullpath = 'folderName/file.ext';
$folder = substr($fullpath, 0, strpos($fullpath, '/'));
echo $folder;
// Output => folderName
Posted by: Guest on March-10-2020

Code answers related to "remove substring before a character in php"

Browse Popular Code Answers by Language