79215371

Date: 2024-11-22 14:21:58
Score: 1
Natty:
Report link

Got the same problem. After trying multiple libraries such as [Hidealo's][1], [IamCal's][2] or [Urakoz's][3], this is the only way I have found to make sure all emojis are gone:

$CleanString = iconv('ISO-8859-1', 'UTF-8', str_replace('?', '', iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $EmojiedString)));

Works like a charm! [1]: https://github.com/hidehalo/emoji [2]: https://github.com/iamcal/php-emoji [3]: https://github.com/urakozz/php-emoji-regex

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jmcollantes