[wd_asp elements=’search’ ratio=’100%’ id=1]

Pound Sign encoding – fputcsv

13th August 2013

Php - Csv, Php - Strings

php codehaven

Use this first to detect what coding the variable is using, this should be UTF-8
echo mb_detect_encoding($pound);

If you have problems with Excel showing £ then you can try adding this second line to your code. It worked for me…

$fp = fopen('dataz.csv', 'w');
fwrite($fp, "\xEF\xBB\xBF");

another that worked was : –

$costsum = "\243".$costsum;