Hi I have a simple HTML form with a one off "thanks for your email" auto response However I want to place a link into the auto response and cant seem to place any HTML elements inside it The statement I want to place html into is this $autoreply = "Thanks for registering your details to confirm your participation in 2013s competition.Please click here for more info"; PHP: I want to make "click here" a hyper link Is there any way to do this or work around Thanks
Have you tried escaping the double quotes? $autoreply = "Thanks for registering your details to confirm your participation in 2013s competition.Please <a href=\"link-goes-here.html\">click here</a> for more info"; PHP:
you can use str_replace like this str_replace("click here",'<a href="link_to_replace">click here</a>',$autoreply);
You can also use single quotes. echo '<a href="http://example.com">link</a>'; PHP: Why use something that would result in using more resources? Not to mention that the code should be as simple as possible.