Answers for "trim two characters remove php"

PHP
2

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
0

string remove last two characters php

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

Code answers related to "trim two characters remove php"

Browse Popular Code Answers by Language