$string1 = 'Cotton Lanyard ½"';
$string2 = 'Organic Cotton Lanyard ⅝"';
echo html_entity_decode($string1); //Cotton Lanyard ½"
echo html_entity_decode($string2); //Organic Cotton Lanyard ⅝"
Not really sure how to fix this?
$string1 = 'Cotton Lanyard ½"';
$string2 = 'Organic Cotton Lanyard ⅝"';
echo html_entity_decode($string1); //Cotton Lanyard ½"
echo html_entity_decode($string2); //Organic Cotton Lanyard ⅝"
Not really sure how to fix this?
It works with an HTML5 document type flag.
echo html_entity_decode($string2, ENT_HTML5); // Organic Cotton Lanyard ⅝"
Since the default type is ENT_HTML401 (HTML 4.01), I suppose that means the ⅝ entity isn't defined there.