title: Delete html elements with php
body: <p>I was wondering if I had an HTML page, how would I delete an element with php, by the name or id of it. so I could have HTML code like this</p>
  
  <pre><code>&lt;div&gt;
      &lt;span id='todelete' name='todelete'&gt;This should be deleted&lt;/span&gt;
      &lt;?php
         delete('todelete');
      ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>or something like that, and the web browser would just show an empty div without the span.
  Is that possible, or is it more useful to just use javascript for this.</p>
  
  <p>Basically, what I'm saying is before the page is compiled, can you delete elements from it, based on some conditionals, not after the page has loaded</p>