Possible Duplicate:
How to parse HTML with PHP?
Grabbing the href attribute of an A element
I have some random text with images in a href tag like this:
<a title="Some title" rel="lightbox" href="http://www.test.com/DSCF0733.jpg"><img class="alignleft size-thumbnail wp-image-504" title="some title" src="http://www.test.com/Dhghjkhjl33-150x150.jpg" alt="description" width="145" height="145" /></a>
I want to find them all and put to an array. Text can contain other links, but we need only with rel lightbox. Please, help!