View Single Post
Old 11-16-2009, 06:16 AM   #1 (permalink)
Peuplarchie
The Acquainted
 
Peuplarchie's Avatar
 
Join Date: May 2008
Location: Québec
Posts: 104
Thanks: 10
Peuplarchie is on a distinguished road
Application Read file and modify line by line before echo ??

Good day to you all,

I'm working on a script wich permit me to read a file line by line and echo it.

Here is my code now:

PHP Code:

<?php

$console 
$_GET["console"];
$name $_GET["name"];


$file fopen("info_gen.txt""r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file))
  {
  echo 
fgets($file). "<br />";
  }
fclose($file);
?>

My problem is I need to be able to add or edit each and every line seperatly and differently before echo everyting.

How can I do so ?

Thanks!
__________________
That's why we are not alone on earth... let's build !
Peuplarchie is offline  
Reply With Quote