Answers for "string remove all occurrences of character php"

PHP
1

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
0

replace all occurrence char in string php

$string = str_replace('search','replace',$string);
Posted by: Guest on January-27-2021

Code answers related to "string remove all occurrences of character php"

Browse Popular Code Answers by Language