title: php domdocument read element inner text
body: <p>I'm new to php so please forgive the simple question:</p>
  
  <p>How do I extract the text from an element?</p>
  
  <pre><code>     &lt;span id="myElement"&gt;Some text I want to read&lt;/span&gt;
  </code></pre>
  
  <p>I have this for a start:</p>
  
  <pre><code>&lt;?php
        $data = $dom-&gt;getElementById("myElement");
        $html = $dom-&gt;saveHTML($data);
  </code></pre>
  
  <p>But then? What is the correct instruction?</p>