Home  >  Article  >  Backend Development  >  Implementation code for emoji transcoding display in php

Implementation code for emoji transcoding display in php

不言
不言Original
2018-08-17 09:54:062099browse

The content of this article is about the implementation code of emoji transcoding display in PHP. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

preg_match_all('/\[\[EMOJI:(.*?)\]\]/',$data['content'],$arr_content);//过滤掉emoji表情
foreach($arr_content[0] as $k=>$v){
        $emoji = str2emoji($v);
        $data['content'] = str_replace($v,$emoji,$data['content']);
}
rrree

Related recommendations:

Solutions to using emoji expressions in php projects

##php parsing emoji expressions supports WeChat

The above is the detailed content of Implementation code for emoji transcoding display in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn