标签: php
我有一个字符串,我想从起始索引中获取子字符串,直到指定的字符出现
string = "hellome@gmail.com" Result Needed = "lome"
答案 0 :(得分:0)
$str = "hellomyself@gmail.com" $substr = substr($str,3,strpos($str,'@')) //where `@` is specified character & 3 is specified index