email - How to send a link in mail using PHP


I am trying to send a link in the mail using PHP but i am not able to format it properly :

$message=".<a href=."".$user_id.">"Click here to view user profile"</a>";



Escape the quotes aroundhref :

$message = "<a href=\"\">Link</a>";

People are also looking for solutions to the problem: HTML and PHP message form


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.