I use PHP Simple HTML DOM Parser

How can I find such a unit?

<div style="display: inline-block;">FIND_ME</div> 

http://simplehtmldom.sourceforge.net/manual_api.htm

    1 answer 1

    The documentation says that the search is performed by CSS-selector. I quote:

    mixed find (string $ selector [, int $ index]) - Find children by the CSS selector

    Obviously, you need to use the appropriate CSS selector:

     $html = file_get_html('http://www.google.com/'); // Ищем нужные элементы foreach($html->find('[style="display: inline-block;"]') as $element) { // Делаем дела } 
    • It seems to be more accurate $html->find('div[style=display: inline-block;]',0); - Hardc0re
    • @Hardc0re, I agree, but we do not know what the author needs. It searches for a block by attribute, not by element, plus it does not mean that it needs one such block. - VenZell