function convertEmail($string) { for( $i = 0; $i < strlen($string); $i++ ) { $newstring .= "&#".ord($string[$i]).";"; } return $newstring; }