php substr()
<?php
$a="zhaogz@job@163.com";
$email_array = explode('@',$a);
echo $email_array[0];
echo "<br>";
echo $email_array[1];
echo "<br>";
echo $email_array[2];
echo "<br>";
$new_email = join ('@',$email_array);
echo $new_email."<br />";
$b = substr($new_email,0,6); // 起点是0,终点是6(终点可不填,意思为到字符串终点为止),读取字符串b为zhaogz
echo $b."<br />";
$c = substr($new_email,-7); //负数为从右向左数,读取的字符串c为163.com
echo $c;
?>