I am trying to export my database to .csv the exporting done ,but it put all the fields
in one column (without separating)
the code :
$sql = "SELECT ARP_name ,Student_name ,institute ,id ,Major from istyle ";
$results=mysql_query($sql);
$filename = "uploaded/".time().".csv";
$handle = fopen($filename, 'w+');
fputcsv($handle, array_keys("ARP_name","Student_name","institute"));
while($row = mysql_fetch_assoc($results))
{
fputcsv($handle, array($row["ARP_name"], $row["Student_name"],$row["institute"]));
}
the result is :

Since your csv export looks perfectly fine on first glance I assume you mean that the spreadsheet you are trying to import the data into puts everything into one single column?
There are various settings you can adjust to describe the csv format details when importing data into spreadsheet applications. Check the applications preferences dialog. OpenOffice and LibreOffice Calc applications come with a great wizard for this.