I've spent a good few hours trying to get this regular expression to work and I'll I've got so far is one big headache!
I'm using cURL to load a page into variable $o. Now somewhere in this page is the following:
<tr valign="top">
<td>value1</td>
<td>value2</td>
<td align="right">value3</td>
</tr>
And this is repeated 3 or so times, naturally, I'd like to grab value1, value2, value3 and store them in an array. Here's my attempt:
preg_match_all('/<tr valign="top"><td>(.*)<\/td><td>(.*)<\/td><td align="right">(.*)<\/td><\/tr>/',
$o,
$out);
But all this seems to output is an empty array. Can anyone spot where I've gone wrong?