PHP code example of byjg / convert

1. Go to this page and download the library: Download byjg/convert 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/ */

    

byjg / convert example snippets



$str = \ByJG\Convert\ToUTF8::fromHtmlEntities('Jo&atilde;o');
echo $str; // João

$str2 = \ByJG\Convert\FromUTF8::toHtmlEntities('João');
echo $str2; // Jo&atilde;o

$str3 = \ByJG\Convert\FromUTF8::removeAccent('João');
echo $str3; // Joao

$str4 = \ByJG\Convert\FromUTF8::toIso88591Email('João');
echo $str4; // =?iso-8859-1?Q?Jo=E3o?=

$str5 = \ByJG\Convert\FromUTF8::onlyAscii('João');
echo $str5; // Joao

// https://en.wikipedia.org/wiki/Combining_character
$str6 = \ByJG\Convert\ToUTF8::fromCombiningChar($combining);
echo $str6;