【发布时间】:2012-07-01 14:56:11
【问题描述】:
我有一个简单的任务要处理 PHP,但由于我不熟悉正则表达式或其他东西......我不知道我要做什么。
我想要的其实很简单……
假设我有这些变量:
$Email = 'john@example.com'; // output : ****@example.com
$Email2 = 'janedoe@example.com'; // output : *******@example.com
$Email3 = 'johndoe2012@example.com'; // output : ***********@example.com
$Phone = '0821212121'; // output : 082121**** << REPLACE LAST FOUR DIGIT WITH *
如何用 PHP 做到这一点?谢谢。
【问题讨论】:
标签: php