I'm importing data from excel to data table. It's working fine. But in some fields, data imported with unknown character '�'. But excel doesn't have such character. Here is my code.
I have tried in many ways. This is my final code.
$new_prod_desc = (ucfirst($data[0])." ".ucfirst($data[5])." ".ucfirst($data[1])." ".ucfirst($data[2]));
$new_prod_desc = preg_replace("/&#?[a-z0-9]+;/i","",$new_prod_desc);
Thanks.