Answers for "remove everything between two characters 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

string remove last two characters php

echo substr($string, 0, -2);
Posted by: Guest on June-29-2021

Code answers related to "remove everything between two characters php"

Browse Popular Code Answers by Language