## 删除字符串最后一个字符
```
$str = 'a,2,3,4,5,';
dump(substr($str, 0, -1));
dump(rtrim($str, ","));
```
## 删除字符串最后的空格、换行
```
$str = 'a,2,3,4,5,
';
echo trim($str,",
"); // 输出"a,2,3,4,5"
```
## 删除字符串开始的空格、换行、制表符
```
$str = '
a,2,3,4,5';
echo ltrim($str); // 输出"a,2,3,4,5"
```