: hi, i'm sorta a newbee to PHP.
:
: anyway, i have looked the net for a few minutes but i couldnt find something that solved my problem.
:
: i'm trying to make a script wich reads lines of a file.
:
: so far i tried the readf thingy, but someone told me you could use an array in order to get some specefic lines e.g $filename[0] would give the first line, though i couldnt find anything about that.
:
: I would be verry happy if someone could push me a bit in the right direction, or give me a little example on how to do this.
:
: Regards,
: Ivo Jonker
:
$myfile = file( $yourfilename );
$i = 0;
while ($i < length($myfile)) {
$currentline = $myfile[$i];
$i++;
}
you get tge idea