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.
我想在出现这样的针后得到字符串的第一位......
$user = strstr('someemail@yahoo.com', '@', true);
但这仅适用于 PHP 版本 5.3.0,我有 5.2.9 有没有办法可以得到相同的结果?
list($user, $therest) = explode('@',$email);