Answer the question
In order to leave comments, you need to log in
How to parse tables with PHP Simple HTML DOM Parser?
Hello! there are tables with timetables navi.mostransavto.ru/?page=rasp&code=1220&ak=24&n=...
They are divided into direct flights and return flights. Stuck at stops over time.
$source = Parser::file_get_html('http://navi.mostransavto.ru/?page=rasp&code=1220&ak=24&n=1&com=');
foreach($source->find('.shedule') as $tableN => $table){
$tables[$tableN]['days'] = array_filter(explode(' ', $table->find('tr.stops', 0)->plaintext));
}
$tables[$tableN]['stations'][$station]['time']
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