I decided to rework the function from scratch. THis is what I came up with:
PHP Code:
function recValues(){
$contents_of_page = file_get_contents('../bible1.html');
preg_match_all("#<td.*>(.+)</td#Ui", $contents_of_page, $tdInnerHTML);
$totaltds = count($tdInnerHTML[1]);
$line = 0;
$strLine = array();
for($k=0; $k < $totaltds; $k++){
if($k % 10 == 0){
print("line ");
$strLine[$line] =
}
if($k % 10 != 0){
$j = 0;
$tdValues = array();
$tdValues[$j] = $tdInnerHTML[1][$k];
print("'");
print("<span style='font-weight: bold; color: red'>".$tdValues[$j]."</span>");
//print($tdInnerHTML[1][$k]);
if($k % 10 == 9){
print("'<br />\n");
}else{
print("', ");
}
//return $tdValues[$j];
$j++;
$line++;
}
}
But I'm stuck. I need
$strLine[$line] = to be equal to all this:
PHP Code:
if($k % 10 != 0){
$j = 0;
$tdValues = array();
$tdValues[$j] = $tdInnerHTML[1][$k];
print("'");
print("<span style='font-weight: bold; color: red'>".$tdValues[$j]."</span>");
//print($tdInnerHTML[1][$k]);
if($k % 10 == 9){
print("'<br />\n");
}else{
print("', ");
}