title: QueryPath : What is the CSS selector of the current element
body: <p>With PHP QueryPath it's easy  to find the content of in element in a HTML page</p>
  
  <pre><code>print QueryPath::withHTML('http://www.example.com', 'title')-&gt;text();
  </code></pre>
  
  <p>Output 'Example Domain'</p>
  
  <p>What I'm trying to do is find content on a page and then find the CSS selector of the element that specific content is in.</p>
  
  <pre><code>htmlqp('http://www.example.com', '*')-&gt;filterPreg('/more/i')-&gt;last());
  </code></pre>
  
  <p>This finds the last elemente containing the string  'more'.
  But i cannot find how to get the CSS selector of this element</p>
  
  <p>I just thought QueryPAth would be an easy way to do this, but I also appriciate other solutions </p>