I have the following code in my script:

$index = @file('index.txt');
for ($i=0; $i<count($index); $i++) { ... ;}

But the problem is that if the file index.txt does not exist,
count($index) will still get the value 1! So the for statement
doesn't work so well.

My question is, is this a PHP error, is it my error, or should
count($index) be 1?

Please let me know!