Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Inclusão do phpQuery
- if (!method_exists('phpQuery', 'newDocumentHTML'))
- require_once 'phpQury/phpQuery-onefile.php';
- //Inicialização do documento, substitua $body pela sua variável contendo o HTML;
- $doc = \phpQuery::newDocumentHTML($body, $charset = 'utf-8');
- //Fazendo loop para capturar os dados
- $links = 0;
- foreach(\phpQuery::pq('ul#lista_municipios li')->find('a') as $linha) {
- # $dados = [];
- echo $links++ . "<br>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement