PHP rtrim() 函数

 

code

<!DOCTYPE html>
<html>
<body>

<?php
$str = "Hello World!";
echo $str . "<br>";
echo rtrim($str,"World!");
?>
  
</body>
</html>

输出

Hello World!
Hello

 

参考:

https://www.w3school.com.cn/php/func_string_rtrim.asp

 

 

posted @ 2019-07-31 23:22  anobscureretreat  阅读(165)  评论(0编辑  收藏  举报