i'm using the next code:

while (!(feof($fp))) {
        echo "<br>$data_file<br>";


to open a file...

but I want to read it from line 3.. and there is a special function for, but
can't find it back :(

can someone tell me the name of this funcion?

I know I can also use a counter into the while-loop, but I know there is a
better sollution for..


The while loop is the way to solve it...don't know about an other solution...

$lineNumber = 3;

$txtnm = "WBSMUTA.CSV";
$txtnm = substr($txtnm, 0, -1);
$fd = fopen ($txtnm, "r");
$i = 1;
while (!feof($fd)) {
        // remove first 3 lines from file
        $lines = fgets($fd, 4096);
        if (!($i = $lineNumber)) {
                echo $lines . "<br>";
fclose ($fd);

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to