Here is a piece of my code while ($data = fgetcsv ($fp, 1000)) { $num = count ($data); for ($c=0; $c < $num; $c++) { $mult[$row][$c] = $data[$c].","; //$mult[$row][$c] = $data[$c] fwrite($fp1, $mult[$row][$c]); } $row ++; } I need to insert a blank line after each iteration of 'c' loop. ie., when the 1st iteration of the c loop exits, I need to insert a blank line and continue doin the same. Any inputs?
Just write the character "\n" to the file. That's an ASCII newline, so should give a newline in your file. Something like: fwrite ($fp1, "\n"); Code (markup): Maybe it's a good idea to include some whitespace in your code as well, just to increase readability.
I realize tht i posted a stupid qstn! I was in such a hurry tht i lost my mind! Anyway, thnx for the reply!