' in CSV file.
When exporting to a csv file I have tired everything to get ride of this and have an apostrophe display in the CSV file instead of ' to no avail. None of this works:
$MFjson = json_encode($rawMF);
$time_MF = html_entity_decode(json_decode($MFjson, true));
$time_MF = trim(preg_replace("/,\n\r|\r\n/", "", $time_MF));
$time_MF = str_replace(array('\r\n', '\r', '\n', ','), ' ', $time_MF);
$time_MF = html_entity_decode($time_MF, ENT_QUOTES, 'utf-8');