> Well, Bas, the fopen and it's associated manual pages describe just how
> to do this. Basic example
> 
> $theFile = fopen("myfile.foo", "r"); //open the file for reading
> while(!feof($theFile)){ // while the file is not at the end of the file
>       $theLine = fgets($theFile, 1024); // get a line, specify a
> length
>       echo $theLine; // print out the line you just got
> } //close the while loop

http://us2.php.net/manual/en/function.file.php

Using file will read each line of a file into an element of the returned
array.  then you can loop through the array and pull out line by
line...example:

$lines = file( "somefile.txt" );

foreach( $lines as $line => $value ) {
  echo "$line = $value<br>";
}

HTH

--
Ray

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to