title: PHP echo content from <tags>
body: <p>I've searched around and around and I'm not sure how this really works.</p>
  
  <p>I have the tags</p>
  
  <pre><code>&lt;taghere&gt;content&lt;/taghere&gt;
  </code></pre>
  
  <p>and i want to pull the "content" so i can put an ifstatement depending on what the "content" is as the "content" is varrying depending on the page</p>
  
  <p>i.e</p>
  
  <pre><code>   &lt;taghere&gt;HelloWorld&lt;/taghere&gt;
  
  $content = //function that returns the text between &lt;taghere&gt; and &lt;/taghere&gt;
  
  
  if($content == "HelloWorld")
  {
      //execute function;
  }
  else if($content =="Bonjour")
  {
      //execute seperate function
  }
  </code></pre>
  
  <p>i tried using preg but it doesnt seem to work and just returns whatever value is in the lines field instead of actually giving me the information within the tags</p>