多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 删除字符串最后一个字符 ``` $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" ```