Hi Gurus,
I start with a line that has 2 versions
1-<TD noWrap align=right bgColor=#3366cc><FONT color=#ffffff size=-1>Results
<B>1</B> - <B>2</B> of <B>2</B>. Search took <B>0.05</B>
seconds.</FONT></TD></TR>
2- <TD noWrap align=right bgColor=#3366cc><FONT color=#ffffff
size=-1>Results <B>1</B> - <B>7</B> of about <B>10</B>. Search took
<B>0.08</B> seconds.</FONT>
Where the numbers will always change.
I'm trying to extract the third number (*2* in example 1, *10* in example 2)
I have this routine that only works with example 2 but not with example 1,
how can I get it to work with both examples?
$total = $line;
$total = preg_replace("/^.*of about <b>/", "", $total);
$total = preg_replace("/^.*of <b>/", "", $total);
$total = preg_replace("/<.*$/", "", $total);
$total = preg_replace("/\,/", "", $total);
$total = trim($total);
return($total);
Or is there a better way?
Thanks again.
Mike
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.493 / Virus Database: 292 - Release Date: 25/06/2003