rtrim

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

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

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