Answer the question
In order to leave comments, you need to log in
How to parse a table. PHP?
There is a schedule www.lp.edu.ua/rozklad-dlya-studentiv?inst=9&group=...
just a plate, you need to somehow parse into elements by day of the week, subgroups and type of week (numerator and denominator). How to do it better? I can't think of an algorithm, I'm using phpQuery.
Answer the question
In order to leave comments, you need to log in
Save the page in the DOM and then continue as appropriate.
php.net/manual/en/class.domdocument.php
Here is an example
$rates = @file_get_contents($config['exchange_source'], false, $context);
$dom = new DOMDocument();
$dom->loadHTML($rates);
foreach( $dom->getElementsByTagName('a') as $node)
{
$array[] = $node->nodeValue;
}
$data = array(
'USD' => array('buy' => $array[5],'sell' => $array[6]),
'EUR' => array('buy' => $array[8],'sell' => $array[9]),
'RUB' => array('buy' => $array[11],'sell' => $array[12]),
);
Solve the problem mathematically through equations and cycles will not be needed here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question