error
| From: | samug | Date: | Tue, 05 Nov 2002 08:27:20 +0000 |
| Subject: | error | ||
| Groups: | php.lang | ||
| Request: | Send a blank email to php-lang+get-400@lists.php.net to get a copy of this message | ||
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.