隐藏邮箱中间几位数
例如9533*****@qq.com
function hide_email ($str) { $arr = explode('@', $str); $rest = substr($arr[0], 0, 4); $len = strlen($arr[0]) - 4; $str = $rest . str_repeat('*', $len) . "@" . $arr[1]; unset($arr); return $str; }
隐藏邮箱中间几位数
例如9533*****@qq.com
function hide_email ($str) { $arr = explode('@', $str); $rest = substr($arr[0], 0, 4); $len = strlen($arr[0]) - 4; $str = $rest . str_repeat('*', $len) . "@" . $arr[1]; unset($arr); return $str; }