Encrypt Email Addresses - PHP

Published on Jan 16, 2017 & tagged in PHP

The Function

function encode_email($e) {
	for ($i = 0; $i < strlen($e); $i++) { $output .= '&#'.ord($e[$i]).';'; }
	return $output;
}

Usage

echo(encode_email('user@example.com'));

Source

Do you need any help on PHP?

I'm happy to help you. Just fill the form on contact page & I will get back to you within few hours.

Recent Posts

  1. Get current store details - Magento 1.9
  2. Simple ways to improve page conversion on product page
  3. The add_image_size() function - WordPress best practices
  4. Remove page title using filter - WordPress
  5. Comment out code in Liquid Template Language