PHP code example of codeinc / strip-accents

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

    

codeinc / strip-accents example snippets



use CodeInc\StripAccents\StripAccents;

echo StripAccents::strip("C'est une super chaîne de caractères avec beaucoup d'accents");
// echoes: C'est une super chaine de caracteres avec beaucoup d'accents

echo StripAccents::strip("ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ");
// echoes: AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy

echo StripAccents::stripNonPrint("ABC ÀÈÝ 是我这");
// echoes: ABC AEY ---

// You can specify any encoding supported by htmlentities() as a second parameter
echo StripAccents::strip("A strïng with àccénts", "iso-8859-1");