Category : function

I’m new to symfony and I have a question! How use this PHP function in my controller by Symfony ? function slugify($string, $delimiter = ‘-‘) { $oldLocale = setlocale(LC_ALL, ‘0’); setlocale(LC_ALL, ‘en_US.UTF-8’); $clean = iconv(‘UTF-8’, ‘ASCII//TRANSLIT’, $string); $clean = preg_replace("/[^a-zA-Z0-9/_|+ -]/", ”, $clean); $clean = strtolower($clean); $clean = preg_replace("/[/_|+ -]+/", $delimiter, $clean); $clean = trim($clean, ..

Read more