Page 1 of 1

PHP Simple HTML DOM

Posted: Thu Apr 18, 2013 6:58 am
by leewad
Hi

Could anybody please help me out?

I trying to find a node value using Simple HTML DOM

I trying to get the title of all logos on website an example is

Code: Select all

<div class="logos"><img src='images/logo-car99.png' alt='Car99 AMG' title='THE MERC AMG'/></div>
I can get all the data using

Code: Select all

 $logo= $html->find('.logos');  
but just trying to get the title "THE MERC AMG" value

Re: PHP Simple HTML DOM

Posted: Thu Apr 18, 2013 12:31 pm
by requinix
If you can't directly get the title attribute, possibly like

Code: Select all

$logo = $html->find('.logos/@title');
then loop over that $logo list and extract the title yourself.