On Wed, 2004-03-03 at 18:30, Labunski wrote:
> Hello,
>
> // This will print first and sixth line from the text file:
> $file = file("people.txt");
> print "$file[0]<br>";
> print "$file[6]<br>";
>
> // But how to print all the lines from [0] to [6] ?
> // Hope you understood my problem.
>
for($i=0; $i < 6; $i++) {
echo "$file[$i]<br />\n";
}
--
Brian V Bonini <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

