code
<!DOCTYPE html> <html> <body> <?php $str = "Hello World!"; echo $str . "<br>"; echo rtrim($str,"World!"); ?> </body> </html>
输出
Hello World!
Hello
参考:
code
<!DOCTYPE html> <html> <body> <?php $str = "Hello World!"; echo $str . "<br>"; echo rtrim($str,"World!"); ?> </body> </html>
输出
Hello World!
Hello
参考: