WWW.RIDESIDE.NET

home | about | tracker | comics

reply to the comment you are replying too
Posted by tgl on 2005-06-15 16:15:48 +0000

standings

It looks like...'; $pattern1 = '/Regular Standings/'; $pattern2 = '/ysptblthbody1/'; $pattern3 = '/\"\/mlb\/teams\/(.*)\"/'; $ii = 0; $jj = 0; $kk = 0; for ($ii = 0; $ii < count($r); $ii++) { $line = $r[$ii]; // Regular Standings if (preg_match($pattern1, $line, $match)) { $ii++; for ($jj = $ii; $jj < count($r); $jj++) { $line = $r[$jj]; // table top if (preg_match($pattern2, $line, $match)) { $jj++; $output .= '

'; $output .=''; $output .=''; for ($kk = $jj; $kk < count($r); $kk++) { $line = $r[$kk]; if (preg_match($pattern2, $line, $match)) { break; } else if (preg_match($pattern3, $line, $match)) { if (preg_match('/([A-Z][A-Z]?[a-z]*\s?)+/', $line, $match)) { $name = $match[0]; } $output .= ''; $output .= ''; $output .= $r[$kk + 1]; $output .= $r[$kk + 2]; $output .= $r[$kk + 3]; $output .= $r[$kk + 4]; $output .= ''; } }// for kk $output .= '

'; $output .='W'; $output .='L'; $output .='Pct'; $output .='GB'; $output .='
'. $name . '
'; }// pattern2 }// for jj }// pattern1 }// for ii print $output; ?>

E-mail to tgl@rideside.net to add your tumblr.
Find me on github.