Hello all,
I am trying to create a CSV file. I have done this. I have put the below in a loop with the first and last lines outside of the loop.
$FileHandle = fopen('tech.csv', 'a+') or die("can't open file");
$stringa = $item." , ".$item2."\r\n";
fwrite($FileHandle, $stringa);
fclose($FileHandle);
However, it comes out like this in the CSV file:
a
b
c
d
Rather than the way I want it:
a b
c d
Basically, two columns rather than one.
What am I doing wrong?