Seems like a fairly simple issue but can't get it to work. I am getting the user to download a csv file(which works fine).
Basically I can't get the carriage return to work.
header("Content-type: text/x-csv");
header("Content-Disposition: attachment; filename=search_results.csv");
echo '"Name","Age"\n"Chuck Norris","70"';
exit;
Result : Name Age\n"Chuck Norris" 70
Tried :
echo '"Name","Age",\n,"Chuck Norris","70"';
Result : Name Age \n Chuck Norris 70
And
echo '"Name","Age",\n\r,"Chuck Norris","70"';
Result : Name Age \n\r Chuck Norris 70
Know what's going wrong?