Why does it create two array sets?
Because the first set is the matched data based on pattern and the second is the information pulled from data.
I then noticed that one of the bits of data had a link in it.
So this is what I ended up with.
[code]
10 BAR |
10A Bana |
A |
<tr class="dTr">
<td class="dTd3ColL">O'CLOCK DAIRY</td>
<td class="dTd3ColL">100 Albert Road</td>
<td class="dTd3ColR"><a href="/grades-and-classes#grades">B</a></td>
</tr>[/code]
Processed with
[php] preg_match_all("/<td ?.>(.)</td>/",$_POST[‘dump’],$return, PREG_PATTERN_ORDER);
$len = count($return[0], COUNT_RECURSIVE);
for ($i=0; $i< $len; $i++) {
if($n == 3){ $n == 0;}
$n++;
if($n == 3){
preg_match_all("/<td ?.><a ?.>(.*)</a></td>/",$return[0][$i],$health, PREG_PATTERN_ORDER);
$value = $health[1][0];
$Script->storeCompanies($value,$n);
}else{
$value = $return[1][$i];
$Script->storeCompanies($value,$n);
}
}[/php]
In the database
10 BAR | 10A Bana | A
O’CLOCK DAIRY | 100 Albert Road | B