Answers for "how to cut a string after a character in php"

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
0

trim specific character from strin using php

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

Code answers related to "how to cut a string after a character in php"

Browse Popular Code Answers by Language