长枪不倒 发表于 2017-4-6 10:27:40

php 字符层截取 技巧

/**
* 去除字符串最后1个字符 最简单方法
*/

$str = "abcd";
$newstr = substr($str, 0, -1); //abc
页: [1]
查看完整版本: php 字符层截取 技巧