How do I remove all specific characters at the end of a string in PHP?

$output = rtrim($string, '.');

(Reference: rtrim on PHP.net)

Leave a Comment