$output = rtrim($string, '.');
(Reference: rtrim on PHP.net)
More Related Contents:
- Find a match pattern of any digit and space with any character in a string and replace with | in PHP [closed]
- Remove new lines from string and replace with one empty space
- How to remove accents and turn letters into “plain” ASCII characters? [duplicate]
- Capturing text between square brackets in PHP
- Remove multiple whitespaces
- How to remove non-alphanumeric characters?
- How to mimic Stack Overflow Auto-Link Behavior
- Remove control characters from PHP string
- How to split a string by multiple delimiters in PHP?
- PHP remove special character from string
- Split camelCase word into words with php preg_match (Regular Expression)
- How to split a long string without breaking words?
- Php – regular expression to check if the string has chinese chars
- PHP – Add link to a URL in a string
- Get last whole number in a string
- Close open HTML tags in a string
- Regex & PHP – isolate src attribute from img tag
- Remove accents without using iconv
- Remove all non-numeric characters from a string; [^0-9] doesn’t match as expected
- How to prefix a positive number with plus sign in PHP
- How to remove numbers from a string with RegEx
- How to validate that a string only contain lowercase letters?
- Regex to match an IP address [closed]
- How to include a PHP variable inside a MySQL statement
- Get characters after last / in url
- Explode string by one or more spaces or tabs
- Using str_split on a UTF-8 encoded string
- Regex / DOMDocument – match and replace text not in a link
- Parse math operations with PHP
- Format 32-character string with hyphens to become UUID