PHP: Remove Everything After and Including String

You are here

If you would like to remove everything after and including "By", string manipulation functions in PHP will do the trick.

$variable = substr($variable, 0, strpos($variable, "By"));