0

如何通过逗号分隔显示名称和电子邮件地址检查电子邮件地址是否有效...

"a1 b.d"<a1@test.com>,  // this is valid
<a2@test.com>,   // this is valid
"a3 b.d"<a3@test.com> , // this is valid
a b.c a4@test.com ,   // this is not valid
"a1 b.d"<a1@test.com>,  // this is valid
<a2test.com>,   // this is not valid
"a3 b.d"<a3@testcom> , // this is not valid
" a b.c a4@test.com " ,   // this is not valid

整体是否有效?如何检查?

4

1 回答 1

0

创建一个包含所有电子邮件的数组,然后在循环时验证。检查列表语言结构。http://php.net/manual/en/function.list.php

于 2012-08-12T13:03:10.730 回答