title: Load CSS files using PHP, based on page content
body: <p>Is this possible? For example, I'm loading all of my css files through my header. One of the things I'm using is the JQuery DataTables plug-in. However, I don't want to load the DataTables css unless the page content contains a DOM element of type "table". I've tried evaluating the page with:</p>
  
  <pre><code>file_get_contents($_SERVER["PHP_SELF"];
  </code></pre>
  
  <p>Which doesn't work. What's the most efficient way to evaluate your page's content in PHP, and load CSS files appropriately? Or, is javascript a better way to do this? </p>