Our blog

 

Get Name from Email Address

Check out this simple and easy function for extracting the name from an email address. It's not very advanced but it is quite handy. Of course it could be used for similar applications by simply changing the character to split on.

PHP:
  1. function email_name($email_address, $split='@'){
  2.     return ucwords(strtolower(substr($email_address, 0, strripos($email_address, $split))));
  3. }

There are some very powerful things you can do with PHP and email. Check out this POP3 email class for some ideas. I am just starting to scratch the surface of this functionality and will doubtless have some more great things to show soon.

More Reading:

  • no matching posts found..

 

Leave a Reply