rtrim

<?php
$str = '14岁';
$new_str = rtrim($str, '岁');
echo $new_str;

如果右边是‘岁’,就过滤掉。

posted @ 2019-04-03 09:27  TBHacker  阅读(316)  评论(0编辑  收藏  举报