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");
// "C'est une super chaine de caracteres avec beaucoup d'accents"
echo StripAccents::strip("ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ");
// "AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiieooooouuuuyy"
use CodeInc\StripAccents\StripAccents;
echo StripAccents::stripNonPrint("ABC ÀÈÝ 是我这");
// "ABC AEY "
echo StripAccents::stripNonPrint("ABC ÀÈÝ 是我这", replaceWith: "-");
// "ABC AEY ---------" (each multibyte character is replaced per-byte)
echo StripAccents::strip("A strïng with àccénts", encoding: "iso-8859-1");
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.