Encode csv so that ir displays special characters

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fjoceklis
Forum Newbie
Posts: 1
Joined: Wed Dec 08, 2010 5:02 am

Encode csv so that ir displays special characters

Post by fjoceklis »

Im new to php and can't get it work right. I succesfully update my csv file, but when I import it in the excel - no special characters (non - english) are displayed. I believe I need to encode in some way....
any ideas?

Code: Select all

$File = "stats.csv"; 
$Handle = fopen($File, 'a');

$Data = $someData . "\n";

fwrite($Handle, $Data); 
fclose($Handle); 
Thanks
Post Reply