https://unicode.org/Public/emoji/11.0/emoji-data.txt
https://unicode.org/emoji/charts/emoji-list.html
https://unicode.org/emoji/charts/index。 HTML
```php
';
$data = array();
$category = array();
foreach ($content as $key => $vo) {
if (in_array($vo['category'], array('Flags', 'Symbols', 'Objects'))) {
continue;
}
if (!isset($data[$vo['category']])) {
$category[] = $vo['category'];
}
$data[$vo['category']][] = $vo;
}
$shuju = array();
$fanyi = array();
$fanyi_text = file_get_contents('1.txt');
$fanyi_arr = explode("\r\n", $fanyi_text);
$i = 0;
foreach ($data as $key => $vo) {
$category = array();
//$category['title'] = $key;
$category['title'] = $key;
$fanyi[] = $key;
//子数据
$i++;
foreach ($vo as $k => $v) {
$child = array();
$child['code'] = $v['codes'];
$child['char'] = $v['char'];
$child['title'] = $v['name'];
// $child['title'] = $fanyi_arr[$i];;
//获取翻译数据
$fanyi[] = $v['name'];
$category['data'][] = $child;
$i++;
}
$shuju[] = $category;
}
/**
* 显示翻译数据
*/
// foreach ($fanyi as $key => $vo) {
// $str .= $vo . '
';
// }
//print_r($fanyi);
/**
* 显示最终结果
*/
//print_r($shuju);
file_put_contents('emoji.txt', json_encode($shuju, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
```
📙 Emojipedia — 😃 Home of Emoji Meanings 💁👌🎍😍
内容
https://unicode.org/Public/emoji/11.0/emoji-data.txt
https://unicode.org/emoji/charts/emoji-list.html
https://unicode.org/emoji/charts/index。 HTML
```php
';
$data = array();
$category = array();
foreach ($content as $key => $vo) {
if (in_array($vo['category'], array('Flags', 'Symbols', 'Objects'))) {
continue;
}
if (!isset($data[$vo['category']])) {
$category[] = $vo['category'];
}
$data[$vo['category']][] = $vo;
}
$shuju = array();
$fanyi = array();
$fanyi_text = file_get_contents('1.txt');
$fanyi_arr = explode("\r\n", $fanyi_text);
$i = 0;
foreach ($data as $key => $vo) {
$category = array();
//$category['title'] = $key;
$category['title'] = $key;
$fanyi[] = $key;
//子数据
$i++;
foreach ($vo as $k => $v) {
$child = array();
$child['code'] = $v['codes'];
$child['char'] = $v['char'];
$child['title'] = $v['name'];
// $child['title'] = $fanyi_arr[$i];;
//获取翻译数据
$fanyi[] = $v['name'];
$category['data'][] = $child;
$i++;
}
$shuju[] = $category;
}
/**
* 显示翻译数据
*/
// foreach ($fanyi as $key => $vo) {
// $str .= $vo . '
'; // } //print_r($fanyi); /** * 显示最终结果 */ //print_r($shuju); file_put_contents('emoji.txt', json_encode($shuju, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); ```
'; // } //print_r($fanyi); /** * 显示最终结果 */ //print_r($shuju); file_put_contents('emoji.txt', json_encode($shuju, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)); ```