We help IT Professionals succeed at work.
Get Started

Encode a string to have only letters and numbers for output

tmcclint asked
Last Modified: 2013-12-13
I need a PHP function that doesn't require any fancy server configuration that can encode a string, for instance an email address, where the output is ONLY letters and numbers. I've tried several examples I've found and some seem to put the "=" equals sign in the output which is causing me problems. I just don't want people seeing this to recognize the string as an email address. It isn't supposed to be secure, just a simple way to disguise the string. Any Ideas? I've tried base64_encode() and convert_uuencode() and from time to time each will include the "=" character.


Watch Question
Senior Systems Engineer
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE