选择语言 :

 Core_Email::clean_email

Clean Extended Email Address: Joe Smith joe@smith.com

string Core_Email::clean_email( string $email )

参数列表

参数 类型 描述 默认值
$email string
返回值
  • string
File: ./core/classes/email.class.php
public function clean_email($email)
{
    if ( ! is_array($email))
    {
        return preg_match('/\<(.*)\>/', $email, $match) ? $match[1] : $email;
    }

    $clean_email = array();

    foreach ($email as $addy)
    {
        $clean_email[] = preg_match('/\<(.*)\>/', $addy, $match) ? $match[1] : $addy;
    }

    return $clean_email;
}