title: How to replace all html tags in a php string using RegEx
body: <p>How to replace all html tags in a php string using RegEx</p>
  
  <p>Tried as follows but fails,</p>
  
  <pre><code>$r = "&lt;h1&gt;Hai&lt;/h1&gt;&lt;br/&gt;&lt;p&gt;Hello world&lt;/p&gt;";
  
  
  $result = preg_replace('&lt;(.*)&gt;', '', $r);
  
  
  
  echo $result ;
  </code></pre>
  
  <p>Expected Result:</p>
  
  <p><code>Hai Hello world</code> as just in string format</p>