title: extract text from tag
body: <p>Hi I've got these lines here, I am trying to extract the first paragraph found in the file, but this fails to return any results, if not it returns results that are not even in <code>&lt;p&gt;</code> tags which is odd?</p>
  
  <pre><code>$file = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
  $hd = fopen($file,'r');
  $cn = fread($hd, filesize($file));
  fclose($hd);
  
  $cnc = preg_replace('/&lt;p&gt;(.+?)&lt;\/p&gt;/','$1',$cn);
  </code></pre>