$str = "Hello World!"; echo $str . "<br>"; echo rtrim($str,"World!"); $str="PHP你好、PHP是世界上最好的预言、我喜欢PHP"; echo rtrim($str,'PHP') PHP你好、PHP是世界上最好的预言、我喜欢 防止忘记 留下备用 Last modification:February 6, 2020 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 反正也没人会打赏