Hi there!

How can I mask an e-mail address like:

before: myname@myprovider.com
after : m#n#m#@###rovider.###

Thank you in advance

James

Hi there,

It depends what you want to do with the e-mail address, but your best (and easiest) option would just be to use strtr. for a full breakdown of the function go to http://us2.php.net/manual/en/function.strtr.php. But a basic algorithm would be:

$maskedAddress = strtr($originalAddress,"AEIOUSTVRP","##########");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.