Use this first to detect what coding the variable is using, this should be UTF-8
1 2 3 |
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…
1 2 3 4 |
$fp = fopen('dataz.csv', 'w'); fwrite($fp, "\xEF\xBB\xBF"); |
another that worked was : –
1 2 3 |
$costsum = "\243".$costsum; |