I am unable to get the column value which contains some special characters. I have checked many answers but i got no idea. I have pasted my sample code and data here,
$pHandle = fopen($filename, "r");
while (($data = fgetcsv($pHandle, 1600, ",")) !== FALSE) {
echo $productName = utf8_encode(htmlspecialchars(trim($data[0])));exit;
}
It echo's nothing.
some sample data's
Any help will be much appreciated.
The function fgetcsv is not reading the string because the string contains an unknown character "-"(shown in the image) it's not hypen
, i replaced the character by "-"hyphen
and it worked.