I have a slight problem at parsing one HTML page.
Here is script i have made so far.
<?php
include('simple_html_dom.php');
$resoults = array();
$URL = "http://www.ajpes.si/eobjave/rezultati.asp?podrobno=0&id_skupina=51&TipDolznika=-1&TipPostopka=-1&id_SkupinaVrsta=-1&id_skupinaPodVrsta=-1&Dolznik=&Oblika=&MS&DS=&StStevilka=&Sodisce=-1&DatumDejanja_od=&DatumDejanja_do=&sys_ZacetekObjave_od=26.6.2014&sys_ZacetekObjave_do=26.6.2014&MAXREC=7000&mdres=3";
getResoults($URL);
function getResoults($URL)
{
global $resoults;
$html = new simple_html_dom();
$html->preserveWhiteSpace = false;
$html->load_file($URL);
$items = $html->find("td.tabData a");
foreach($items as $key => $post)
{
$resoults[][] = array($post->plaintext);
}
$html->clear();
unset($html);
print_r(array_values($resoults[1]));
print_r(array_values($resoults[2]));
print_r(array_values($resoults[3]));
print_r(array_values($resoults[4]));
print_r(array_values($resoults[5]));
print_r(array_values($resoults[6]));
}
?>
What i currently get is a array of results ranging from 1 ... XX
What i need is a two dimensional array ... first dimension will be at which <tr></tr>
block i am:
and second array will store values of each result i find:
So for example values should be stored like this:
Array[1][0]
Array[1][1]
Array[1][2]
And for next node:
Array[2][0]
Array[2][1]
Array[2][2]
If someone could help me that would be great!
Thank you all for your time!