Hello,
I am updating contact_us table from Admin Panel and displaying that to Public Panel. I am giving information like Feedback as
Myself ~ Web Master
webs@mail.com
What I want is when I give an email in this string, then that should become an email link to that email address with mailto:
TIA!
How to make email into email links with mailto
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Is
The actual format of the string? Can you clarify exactly what you are dealing with here?Myself ~ Web Master
webs@mail.com
For example, i am entering a string My name and then my email like
Mr. Developer
info@domain.com
then I want that script should deal the normal string " Mr. Developer " as normal and it should make email a link with mailto:
Thanks!
Mr. Developer
info@domain.com
then I want that script should deal the normal string " Mr. Developer " as normal and it should make email a link with mailto:
Thanks!
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Again, a simple preg_replace, adding the <a> </a> tags around the match. Feel free to do a bit of research as we've had countless talks about email regular expression.amir wrote:For example, i am entering a string My name and then my email like
Mr. Developer
info@domain.com
then I want that script should deal the normal string " Mr. Developer " as normal and it should make email a link with mailto:
Thanks!