Example:
PHP
<?php
function permalink($var)
{
$var=preg_replace('#([\W_]+)#',' ',$var);
$var=str_replace('?','',$var);
$var=str_replace(' ','-',$var);
$var=strtolower($var);
return $var;
}
?>
How to create title to url/slug in PHP | PHP Function Tutorial |
Type: | Php |
Category: | Web Tutorial |
Sub Category: | PHP Function Tutorial |
Uploaded by: | Admin |