Answers for "write a php script to remove a part of a string from the beginning."

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
1

php remove first word from string

echo trim(strstr("How are you?"," ")); //are you?
Posted by: Guest on October-05-2021

Code answers related to "write a php script to remove a part of a string from the beginning."

Browse Popular Code Answers by Language