Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/30/2022 in all areas

  1. like this $html = '<html> <body> <div class="entry-content"> <h2>hi tags?</h2> <ul> <li>some text</li> <li>sometext</li> <li>sometext</li> <li>sometext</li> </ul> <h2>hi tags2 ?</h2> <ul> <li>some text</li> <li>sometext</li> <li>To ometext</li> <li>Theometext</li> </ul> </div> </body> </html>'; $xml = simplexml_load_string($html); $tags = (array) $xml->xpath("//div[@class='entry-content']/ul")[0]->li; echo '<pre>$tags= ' . print_r($tags, 1) . '</pre>';
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.