Answer the question
In order to leave comments, you need to log in
How to display text when parsing with PHP Simple HTML DOM Parser?
Good evening everyone!
Perhaps the question is not quite correct. Not so long ago I started studying PHP, and I want to try to write a dynamic site parser, to make it more interesting - I took the Olimp bookmaker as an example. I want to get, for example, the coefficient for the victory of the first team, using PHP Simple HTML DOM Parser. Now it turns out to get in general all possible options for bets and odds. But how do I display only the one I need? The code is currently like this:
//Подключение библиотеки для парсинга
require_once('simple_html_dom.php');
//Получаем HTML код нужной нам страницы
$html = file_get_html('http://olimp.kz/index.php?page=line&action=2&live[]=22903918');
//В цикле выбираем все элементы с тегом <nobr> и выводим их построчно
foreach($html->find('nobr') as $element)
echo $element . '<br>';
Interface language:
Odds format:
F1(-3) - 1.95
F2(3) - 1.8
Tot(5.5) M - 2.1 B - 1.7
Danubio (res) (4.5) men - 1.65 Danubio (res) (4.5) bol - 2.15
El Tanke Sisley (res) (1.5) men - 1.45 El Tanke Sisley (res) (1.5) ball - 2.6
El Tanke Sisley (res): 1 goal - 1.45
El Tanke Sisley (res): 2 goals - 3.1
El Tanke Sisley (res ) ): 3 or more goals - 12
3:2 - 9
3:1 - 5.5
4:1 - 2.9
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