0

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>"; 
1
  • 1
    Escape the embedded double-quotes? Like "<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. Commented Oct 31, 2013 at 6:42

1 Answer 1

1

Escape the quotes around href :

$message = "<a href=\"example.com\">Link</a>"; 
Sign up to request clarification or add additional context in comments.

Comments