Jump to content

[SOLVED] returning after 8 tabs


jakebur01

Recommended Posts

I have searched and not been able to figure how to return to a new line after 8 number of loops or tabs when writing to a text file. I would like to write 8 fields then tab to a new line. Something like:

$i = 0;
$tmp = $html->find('span[class=mqEmp], span[class=Black11]');
$cnt = count($tmp) - 1;
foreach($tmp as $e) {
    if($i > 0 && $i < $cnt){

        $outputstring=$e->plaintext . '\t';

	 fwrite($fp, $outputstring, strlen($outputstring));

// if eighth field, then start a new row    something like:  fwrite($fp, \n);
            

    }
    $i++;
}

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/152871-solved-returning-after-8-tabs/
Share on other sites

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.