f



reading a .txt-file with php

Hello NG,

I have the following problem and it would be nice, if someone could help 
me out on this problem:

Thanks for your help!
Jules Bach



content of file.txt

#1: Michael
#2: Dennis
#3: Karl


the following file writes only the first line of file.txt:

<?php
$fp = fopen("file.txt","r");
if ($fp)
{
$line = fgets($fp, 100);
echo "$line<br><br>";
fclose($fp);
}
?>

Now I would like to have a PHP-file, which can write every line in 
different orders (the order should be write in the PHP-file)

for example:

#2: Dennis
#1: Michael
#3: Karl

is this possible? Thank you very much for your help.

0
9/9/2003 4:31:39 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

1 Replies
633 Views

Similar Articles

[PageSpeed] 35

"Jules Bach" <jules.bach@gmx.de> wrote in message
news:bjkvc1$3p9$1@online.de...
> Hello NG,
>
> I have the following problem and it would be nice, if someone could help
> me out on this problem:
>
<snip>

Already answered in alt.php. Please don't multipost.
http://oakroadsystems.com/genl/unice.htm#xpost


0
loopback1 (25)
9/9/2003 6:01:49 PM
Reply: