Преобразовать короткое имя смайлика в изображение с помощью пользовательской функцииPhp

Кемеровские программисты php общаются здесь
Гость
Преобразовать короткое имя смайлика в изображение с помощью пользовательской функции

Сообщение Гость »


I have created a function that converts emoji short name to image but I am stuck how do i get emojis short names from a string so the function can convert those to emoji image .

$field_from_db = ':slight_smile:'; $shortcode_replace = shortcode_replace(); $shortname = $shortcode_replace[$field_from_db]; This code search in shortcode fucntion and replaces it with unicode to get cdn image $shortname = $shortname[0]; echo convertImage($shortname); after we got unicode for cdn predesigned in the shortcodes function it returns back with the image url Now i am confuse how it will convert from a string
$field_from_db = 'Hello How are you :slight_smile::joy:'; //Here we have a string so how do i convert all short names to emoji using the function i created

Вернуться в «Php»