Is there a PHP library that facilitates manipulating html elements in a similar fashion to jquery?
<p>PHP string manipulation functions are very counterintuitive and clunky, at least for me, and everytime I need to manipulate some html code before outputting it it takes too much time.</p>

<p>I was wondering if there was any PHP library that helps with this, preferably in a similar way to jQuery: retrieving and manipulating element attributes, selecting all the attributes with a  given class, etc.</p>
