"Functions:: SEO Slug Friendly"
Bootstrap 3.3.0 Snippet by fathankudo

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> URL Friendly String Slug <?php /** * Return URL-Friendly string slug * @param string $string * @return string */ function seoUrl($string) { //Unwanted: {UPPERCASE} ; / ? : @ & = + $ , . ! ~ * ' ( ) $string = strtolower($string); //Strip any unwanted characters $string = preg_replace("/[^a-z0-9_\s-]/", "", $string); //Clean multiple dashes or whitespaces $string = preg_replace("/[\s-]+/", " ", $string); //Convert whitespaces and underscore to dash $string = preg_replace("/[\s_]/", "-", $string); return $string; } echo seoUrl('Acer One 10-S100X - Windows 8.1 / 10 Home + Office 365'); ?>

Related: See More


Questions / Comments: