string - replace trademark symbol (™) with html code in php -
i have following string:
$str='enzyme™ trademark';
now want put string in csv file like: 'enzyme™ trademark'
, `because if "™" placed in csv file, magento import product setup escapes it.
can please me on issue googled lot not found correct suggestion. sorry 4 bad english.
i tried following code:
htmlentities($db->col['title'], ent_quotes | ent_ignore, "utf-8");//but removes '™'<br> htmlentities($db->col['title'], ent_quotes , "utf-8"); //removes whole string <br>
using global function htmlentities in php, can convert string 'special characters' 1 using html entities.
$variable = "enzyme™ trademark"; $convertedvariable = htmlentities($variable); echo $convertedvariable; // echos: enzyme™ trademark
Comments
Post a Comment