我与它是用PHP编写CRM工作的高度计,我需要创建一组电子邮件地址是高度用于例如:组的电子邮件地址,该地址在列表
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
这里是我想为:
[email protected] (3)
[email protected] (2)
[email protected] (1)
我试图像在PHP代码:
$string_emails = "[email protected] [email protected] [email protected]
[email protected] [email protected] [email protected]";
$emails = str_word_count($string_emails, 1);
$ret = array_count_values($emails);
print_r($ret);
,但没有运气这是告诉我只是字而已。
谢谢。
停止链接函数调用那样。它使它无法调试。 '$ arr = str_word_count(...);后续代码var_dump($ ARR); $ RET = array_count_values($ ARR);后续代码var_dump($ RET)'是调试容易得多。 –
感谢马克,我将借此 – Max
'array_count_values的护理(爆炸(””,$ string_emails))'大概是你所需要的。 –