Answers for "php cut string at character and take all after"

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 "php cut string at character and take all after"

Browse Popular Code Answers by Language