仅在句点结束时,如何删除最后一个字符?
$string = "something here."; $output = 'something here';
$output = rtrim($string, '.');
(参考:PHP.net上的rtrim)