Hello everyone, I use nokogiri to work with Avito. There is such a construction:

$html = file_get_contents('https://www.avito.ru/krasnodar/vakansii'); $saw = new nokogiri($html); echo '<pre>'; foreach($saw->get('.breadcrumbs-link-count') as $item){ print_r($item); } echo '</pre>'; 

At the exit, I see this:

 Array ( [class] => breadcrumbs-link-count [#text] => Array ( [0] => 4 940 ) ) 

How can I bring not all this beauty, but only the numbers 4 940?

    1 answer 1

    So, for example:

     print_r($item['#text'][0]); 
    • Super! You helped me a lot! I tried a bunch of options, I did not think of this. Thank you very much - Anton