How can i get the numbers 148.42 from the markup below with preg_match_all? They all have the same class, so i have no clue how to get the numbers.
I have 2 variables - $usd_kzt and $eur_kzt and i need to store the digit values from the code below in these two variables.
<td width="15"><input id="idval7" name="idval" class="idValI" value="5" type="checkbox"></td> <td class="gen7" align="left"> 1 ДОЛЛАР США</td>
<td class="gen7" align="center">USD / KZT</td>
<td class="gen7" align="center">148.42</td>
<td class="gen7" align="center">EUR / KZT</td>
<td class="gen7" align="center">200.42</td>
<td class="gen7" valign="middle" width="10" align="left">
<img src="images/whup.gif"></td>
<td class="gen7" align="center"></td>
Tried something like this:
preg_match_all('/<td\s+.*?>(.*)<\/td>/is', $data, $matches);
print_r($matches); // returns nothing
thanks in advance