Get data between HTML Tags

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm looking to get the baseball score between the html tags on yahoo and
create my own rows with just the data.

So far I have this code
$data = file_get_contents(' /');
list(, $data_split) = explode('<td width="50%" class="yspscores">', $data,
list($data2, ) = explode('</a></td>', $data_split, 2);
$data2 = strip_tags($data2);
echo $data2;

It gives me all the results but I want to do a loop that will find the first
row of scores create a new row and put the data in the new row then find the
next row of scores create another new row and insert the data and continue
that pattern to the end.


Re: Get data between HTML Tags

I forgot to mention my host is using PHP 4.3.10


Quoted text here. Click to load it

Site Timeline