Jump to content

[SOLVED] Simple Question


paulman888888

Recommended Posts

so do you just want the first 6 lines or do you want to dump them you could do something like this

//first 6 lines
$fh = fopen("file","r");
$line = 1;
while(!feof($fh)){
    if($line > 6) break;
    $data .= fgets($fh);
    $line++;
}
//skip first 6 lines
$fh = fopen("file","r");
$line = 1;
while(!feof($fh)){
    if($line > 6){
        fgets($fh);
        $line++;
    }else{
          $data .= fgets($fh);
     }
    $line++;
}

 

Scott.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.