title: How to strip html tags and leave link from a variable in php
body: <p>How do I strip the HTML tags from a variable and leave the link? I am trying to send emails with the link but without the tags. I've tried <code>strip_tags()</code>, but it removes the link.</p>
  
  <p><code>$var = "this is a link &lt;a href="mylink"/&gt;yes it is&lt;/a&gt;;</code> </p>
  
  <p><code>$message ="$var"; // email massage</code>  </p>
  
  <p>How would I go about making it into
  "this is a link mylink yes it is"?</p>