Answers for "php remove after last dot"

PHP
2

php substr remove last 4 characters

echo substr($string, 0, -3);
Posted by: Guest on October-24-2020
0

remove last 3 character from string php

$str = removeLast3char($str);
function removeLast3char($string){
    return trim(substr($string, 0, -3));
}
Posted by: Guest on March-16-2022

Browse Popular Code Answers by Language