Answers for "php str remove 2 characters from end"

PHP
3

php remove after character

$s = 'Posted On April 6th By Some Dude';
echo strstr($s, 'By', true); // Posted On April 6th
Posted by: Guest on October-06-2020
1

php remove last 3 letters from string

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

Code answers related to "php str remove 2 characters from end"

Browse Popular Code Answers by Language