I have a little trouble putting together regular expressions, I'm trying to work with this code:
<?php
$url = file_get_contents('http://ciagri.iea.sp.gov.br/precosdiarios/');
preg_match_all($expressao, $url, $conteudo);
echo $conteudo;
?>
I need to get prices between these codes:
<tr style="background-color:White;">
<td style="width:170px;">
Mandioca para mesa
</td>
<td style="width:120px;">
Mogi Mirim
</td>
<td align="right" style="width:70px;">
11,50
</td>
<td align="center" style="width:70px;">
cx.23 kg
</td>
<td style="width:200px;">
<div id="ctl00_ContentPlaceHolder1_gridRecebidos_ctl95_PanelGridObs">
</div>
</td>
</tr>
<tr>
<td style="width:170px;">
Mandioca para mesa
</td>
<td style="width:120px;">
Pindamonhangaba
</td>
<td align="right" style="width:70px;">
28,00
</td>
<td align="center" style="width:70px;">
cx.23 kg
</td>
<td style="width:200px;">
<div id="ctl00_ContentPlaceHolder1_gridRecebidos_ctl96_PanelGridObs">
</div>
</td>
</tr>
<tr style="background-color:White;">
<td style="width:170px;">
Mandioca para mesa
</td>
<td style="width:120px;">
Sorocaba
</td>
<td align="right" style="width:70px;">
8,79
</td>
<td align="center" style="width:70px;">
cx.23 kg
</td>
<td style="width:200px;">
<div id="ctl00_ContentPlaceHolder1_gridRecebidos_ctl97_PanelGridObs">
</div>
</td>
</tr>
To take the price of each city:
-What would be the best standard to use?