Okay so it seems to be one issue after another with this code...
This time it's a notice:
"Notice: Undefined offset: 0 in ..."
and is printed a bunch of times (once each time through the loop)
foreach($lines as $no => $line) {
if (!$finish[0]) {
break;
}
# Where the content starts
if (strstr($line, $start[0])) { // line the notice refers to
array_shift($start);
$keep = true;
}
if ($keep) { ... }
}
So this code is supposed to find where the content begins in an html file (which is a page displaying a news article). After finding the beginning (which I don't think it does), it's supposed to alter things like links etc so that the article can be posted to a newsgroup. Currently, the content of the html file is being erased when the code runs, and a blank message is posted to the newsgroup instead of the article. I think this notice might be the problem since the alterations to the file depend on $keep being true.
Please don't suggest that I lower my error reporting settings, I would rather get suggestions that could help me in fixing the problem rather than hiding it.
Thanks a ton!