Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I am trying to send a link in the mail using PHP but i am not able to format it properly :
$message=".<a href=."http://abc.com/viewprofile.php?userid=".$user_id.">"Click here to view user profile"</a>";
"<a href=\"http://...>"
Escape the quotes around href :
href
$message = "<a href=\"example.com\">Link</a>";
Add a comment
"<a href=\"http://...>". If you use an editor with syntax highlighting (or just look at the code snippet in your question here) it should be quite obvious what's wrong.