Elgg  Version 4.3
friendlytitle.php
Go to the documentation of this file.
1 <?php
9 $title = elgg_extract('title', $vars);
10 if (empty($title)) {
11  echo $title;
12  return;
13 }
14 
15 //$title = iconv('UTF-8', 'ASCII//TRANSLIT', $title);
16 $title = preg_replace("/[^\w ]/", "", $title);
17 $title = str_replace(" ", "-", $title);
18 $title = str_replace("--", "-", $title);
19 $title = trim($title);
21 
22 echo $title;
$title
Friendly title Makes a URL-friendly title.
elgg_strtolower()
Wrapper function for mb_strtolower().
Definition: mb_wrapper.php:154
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:547
elgg echo
Translates a string.
Definition: deprecated.js:530
$vars['head']
Definition: html.php:24