1
$string = "C-Tru Process Equipments P’ship";
echo html_entity_decode($string);

I expect to get: C-Tru Process Equipments P’ship result but the output is C-Tru Process Equipments P’ship

I put my string into https://mothereff.in/html-entities and this shows me the result perfectly, my file with the string is UTF8 formatted.

L McClean
  • 340
  • 1
  • 8
StefanBD
  • 334
  • 3
  • 14
  • 1
    I just ran this on my local test machine with PHP7.2, and I get the apostrophe as expected. I'm thinking this is perhaps to do with the browser you are using? I'm using the latest Chrome 68.0.3440.106 – Gary Thomas Aug 20 '18 at 14:45
  • i tryt it in the terminal(putty), i save the result in a UTF8 Mysql DB which also shows me my result. Currently i helped me with preg_replace("/[0-9]{1,};/", " ", $val) but not a perfect solution – StefanBD Aug 20 '18 at 14:46

0 Answers0