Home  >  Article  >  Backend Development  >  php 字符层截取 技艺

php 字符层截取 技艺

WBOY
WBOYOriginal
2016-06-13 13:13:48773browse

php 字符层截取 技巧
/**
* 去除字符串最后1个字符 最简单方法
*/

$str = "abcd";
$newstr = substr($str, 0, -1); //abc

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn