Answers for "php remove letter from string if they are in a specific order"

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

trim specific character from strin using php

$widget_id = trim($widget_text,'[]')
Posted by: Guest on January-25-2021
-1

php remove control characters from string

preg_replace('/[[:cntrl:]]/', '', $input);
Posted by: Guest on June-29-2021
0

remove exact characters from string using php

$widget_id = substr($widget_text, 1, strlen($widget_text)-2);
Posted by: Guest on October-22-2021

Code answers related to "php remove letter from string if they are in a specific order"

Browse Popular Code Answers by Language