Implementation code for emoji transcoding display in php

不言
Release: 2023-04-03 19:30:01
Original
2133 people have browsed it

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']);
}
Copy after login
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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template