I have used CSV parser from http://code.google.com/p/parsecsv-for-php/, to export my reports to CSV in PHP. I have displayed Sales Total value in €XXXX.XX
You would need to use html_entity_decode()
on the strings before writing them to file, which will find all html entities and replace them with their actual symbol.
html_special_chars()
and html_special_chars_decode()
only works on a few html entities, like >
and <
, while htmlentities()
and html_entity_decode()
works on all of them.
Alternatively, you could just do a string replace (str_replace()
or preg_replace()
or whatever) for €
to replace with €
.
Then Try:
str_replace('€','€',$valuebeingexported);