3

我想在出现这样的针后得到字符串的第一位......

$user = strstr('someemail@yahoo.com', '@', true); 

但这仅适用于 PHP 版本 5.3.0,我有 5.2.9 有没有办法可以得到相同的结果?

4

1 回答 1

9
list($user, $therest) = explode('@',$email);
于 2009-10-05T19:24:49.673 回答