protected function get_table_rows($html, $table_start)
{
if ($table_start == "Writing Credits" || $table_start == "Series Writing Credits") {
$row_s = strpos($html, ">" . $table_start);
} else {
$row_s = strpos($html, ">" . $table_start . " <");
}
$row_e = $row_s;
if ($row_s == 0) {
return FALSE;
}
$endtable = strpos($html, "</table>", $row_s);
$block = substr($html, $row_s, $endtable - $row_s);
if (preg_match_all('!<tr>(.+?)</tr>!ims', $block, $matches)) {
$mc = count($matches[1]);
/* for ($i=0;$i<$mc;++$i) if ( strncmp( trim($matches[1][$i]), "<td valign=",10) == 0 ) $rows[] = $matches[1][$i]; */
$rows = $matches[1];
}
return $rows;
}