He has already been told of this error on another forum, he posted this same question on 4 or 5 forums, probably school work.
This is stilll wrong:
Code:
for($i=0; $i=scalar(@file); $i++)
it should be:
Code:
for($i=0; $i < scalar(@file); $i++)
otherwise it will probably just go into an infinite loop