PHP code example of iamcal / php-emoji

1. Go to this page and download the library: Download iamcal/php-emoji library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

iamcal / php-emoji example snippets



hen you recieve text from a mobile device, convert it
# to the unified format.

$data = emoji_docomo_to_unified($data);   # DoCoMo devices
$data = emoji_kddi_to_unified($data);     # KDDI & Au devices
$data = emoji_softbank_to_unified($data); # Softbank & pre-iOS6 Apple devices
$data = emoji_google_to_unified($data);   # Google Android devices


# when sending data back to mobile devices, you can
# convert back to their native format.

$data = emoji_unified_to_docomo($data);   # DoCoMo devices
$data = emoji_unified_to_kddi($data);     # KDDI & Au devices
$data = emoji_unified_to_softbank($data); # Softbank & pre-iOS6 Apple devices
$data = emoji_unified_to_google($data);   # Google Android devices


# when displaying data to anyone else, you can use HTML
# to format the emoji.

$data = emoji_unified_to_html($data);

# if you want to use an editor(i.e:wysiwyg) to create the content, 
# you can use html_to_unified to store the unified value.

$data = emoji_html_to_unified(emoji_unified_to_html($data));