blob: a92726f6948942135b426355b89a9dc4845091a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<?php
/**
* Friendly title
* Makes a URL-friendly title.
*
* @uses string $vars['title'] Title to create from.
*/
$title = $vars['title'];
$title = trim($title);
$title = strtolower($title);
$title = preg_replace("/[^\w ]/","",$title);
$title = str_replace(" ","-",$title);
$title = str_replace("--","-",$title);
echo $title;
|