error
[email protected] ("samug") Tue, 5 Nov 2002 10:27:20 +0200
| Newsgroups | php.lang |
|---|---|
| Message-ID | <[email protected]> |
My script looks like this:
$infile = "input.txt";
$fp = fopen($infile, "r") or die("Couldn't open $infile");
while(!feof($fp)){
$line = fgets($fp);
$trimmed = trim($line);
list($start,$middle,$end) = split(' ', $trimmed);
list($middle_start, $middle_end) = split(':', $middle);
}
fclose($fp);
All I get is errormessages:
Notice: Undefined offset: 1 in C:\Apache\Apache2\htdocs\stuff\i3.php on
line 10
Notice: Undefined offset: 1 in C:\Apache\Apache2\htdocs\stuff\i3.php on
line 10
and so on.
What function gives that errormessage?
Should I put quotes somewhere.
It works for a single line.
The line looks like this: "Name. 1:1. Some text."
If you could help, I would appreciate it.