V
V
Vladislav2020-04-22 12:55:52
JavaScript
Vladislav, 2020-04-22 12:55:52

How to get data from html?

5ea013d25d555580775653.png
How to get these numbers using JQ. (I write the code in phpQuery)
There is also the next label that goes there too, there are 5 in total.
Well, here you can see it:
5ea014477f56c749910901.png

Well, the code itself for convenience:
jsfiddle.net/61vhr8et

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav, 2020-04-22
@cr1gger

Understood:

$('.filters__counters').each(function() {
  console.log($(this).text());
});

in phpquery:
$dom = phpQuery::newDocument($response);
            $form = pq($dom);
            $form = $form->find('.filters__counters');

            foreach ($form as $a) {
                echo $a->textContent . '<br>';
            }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question