Thanks Jcbones.
But what if I wanted to call the contents of a line from the file again.
Being out side of the for statment. How would I do this?
Could I make the statment $line[0]; to return the 1 from the file?
For example if the array was coded like this then I would be able to call elements of the array by the code
echo $numbers[0];
<?php
$numbers = array('10', '9', '8', '7', '6', '5', '4', '3', '2', '1');
if (file_exists("array.txt")) echo "File exists";
$fh = fopen("array.txt", 'r') or
die("File Does not exist");
$line = fgets($fh);
$numbers[1] = $line;
$line = fgets($fh);
$numbers[0] = $line;
fclose($fh);
echo "<br />";
echo $numbers[1];
echo "<br />";
echo $numbers[0];
?>