Write to a CSV file on two columns

GamaDanikaty

New Member
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.\[code\]$FileHandle = fopen('tech.csv', 'a+') or die("can't open file");$stringa = $item." , ".$item2."\r\n";fwrite($FileHandle, $stringa);fclose($FileHandle);\[/code\]However, it comes out like this in the CSV file:\[code\]abcd\[/code\]Rather than the way I want it:\[code\]a bc d\[/code\]Basically, two columns rather than one.What am I doing wrong?
 
Back
Top