Salve, perchè non va dicendomi "Resource id #2"?

$file=fopen("testo.txt","r");
$array=explode("\n", $file);
for ($i=0; $i<=9; $i=$i+1)
{
echo "$array[$i]
";
}

Penso ci siano problemi nel recuperare il testo in una variabile splittata...

Graziein anticipo.