Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个看起来像的字符串"s="0">hello how are you doing today并且我需要它是 only hello how are you doing today,我怎样才能去掉 PHP 中的前 7 个字符?
"s="0">hello how are you doing today
hello how are you doing today
我认为有人会使用长度并将子字符串从位置 6 带到长度,但这似乎效率低下。有更好的方法吗?
采用:-
$str = substr($str, 7,strlen($str));
它将选择从第 7 个位置开始直到字符串长度的子字符串。