Answer the question
In order to leave comments, you need to log in
How to retrieve table data?
I make a curl request to the site and get the html of the page, I need to pull out the data of 2 columns from the table and write it to an array. After searching the Internet, I understand it will be convenient to use the phpQuery library.
the table itself:
Problem:
As you can see in the photo in the td tag there is a script that is not needed, and also a text: 80 - you need to pull it out !!
$doc = phpQuery::newDocument($result);
foreach ($doc->find('#tblproxy') as $value) {
$value = pq($value);
$uuu= $value->find('tr td:nth-child(2)');
$ppp= $value->find('tr td:nth-child(3)');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question