PHP code example of rep98 / slug

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

    

rep98 / slug example snippets


$str = "El niño juega carro con su pelota";
echo SvSlug($str);
/* Return -->
 *  el-nino-juega-carro-con-su-pelota
 */

/* SlugsOptions */
$SlugsOptions = [
	"delimiter" => '-', // Separador
	"limit" => -1, // Limite de Caracteres
	"lowercase" => true, // Slugs en minusculas
	"replacements" => [], // Paramentros extras a reemplazar del Slugs
	"transliterate" => true, // Traducir literales del texto
	"unique" => false // Generar Slug únicos esta opción usa Sqlite3
]