title: How to remove a href attribute from all links using php
body: <p>How to remove a href attribute from all links from div element using php ?</p>
  
  <p>Something like this:</p>
  
  <pre><code>if($condtion = "true"){
  echo '&lt;a href="" class="no-link"&gt;Please login&lt;/a&gt;';
  }
  else{
  echo '&lt;a href="www.google.com" class="yes-link"&gt;Admin Section&lt;/a&gt;';
  }
  </code></pre>
  
  <p>I was searching for solution, but all what i found was solution with jquery</p>
  
  <p>like this:  </p>
  
  <pre><code>$(selector).removeAttr(attribute)
  </code></pre>
  
  <p>Thank you</p>