IPB

Career Guidance | Technical Jobs | Walkin Interview & Job Fairs | Fresher Jobs

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Read file and modify line by line before echo ??
Misha Singh
post Nov 16 2009, 06:16 AM
Post #1


Advanced Member
***

Group: Members
Posts: 8,266
Joined: 23-November 08
Member No.: 6,521



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!
Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic
Tags
No Tag inserted yet

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 15th March 2010 - 11:11 PM