开发者

Remove beginning of PHP string until it's 13 characters?

I have a variable that needs it's value's shortened until they are 13 characters. It needs to chop off characters from the beginning of the string. Is thi开发者_运维问答s built into PHP?


The following should work for you:

$str = substr($str, -13);


The substr function is what you're looking for,

$text = "abcdefghijklmnopqrstuvwxyz";
$text = substr($text, -13);


Use substr:

$v = substr($v, -13);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜