【发布时间】:2012-05-19 12:23:09
【问题描述】:
我将如何获取下面字符串的最后 7 个字符?
例如:
$dynamicstring = "2490slkj409slk5409els";
$newstring = some_function($dynamicstring);
echo "The new string is: " . $newstring;
将显示的内容:
The new string is: 5409els
【问题讨论】:
-
question identified as a dup 和这个问题完全不一样。
-
讽刺的是,当我在 Google 上搜索这个主题时,我被带到了这里。 叹息
-
@Asaph 我称之为堆栈影响。人们尝试任何事情来解决问题,他们要做的第一件事就是将其标记为重复,只是为了标记它
-
在 SO 中搜索问题并在答案中找到一行代码比阅读手册要容易得多。