title: php replace id element content in string
body: <p>a bit stuck, is it possible to use PHP to update/change html element contents.
  So replace only 'Hello World' in the string below based off the the id name.</p>
  
  <pre><code>$html = '&lt;h1 id="item" class="abc" data="efg"&gt;Hello World&lt;/h1&gt;';
  </code></pre>
  
  <p>Perhaps using preg_replace, just want to leave all other content in there, eg. class, data, etc.</p>
  
  <pre><code>$html = preg_replace('&lt;h1 id="item"&gt;????&lt;/h1&gt;', 'New Content', $html);
  </code></pre>
  
  <p>Thanks</p>