php remove everything after a specific character

37

$str = 'Posted On April 6th By Some Dude';
echo strtok($str, 'By'); // Posted On April 6th

Comments

Submit
0 Comments