Example #1
0
 /**
  * Returns a URL Safe Title Slug, limited to the specified characters
  * 
  * @param	string	title
  * @param	int		limit (default 25)
  * @return	string	url safe slug
  */
 public static function title_slug($title, $limit = 25)
 {
     return preg_replace("/([_+]|_)\$/", "", str::limit_chars(inflector::underscore(str::strip_all_but(strtolower($title), "a-z0-9 \\_")), $limit, ""));
 }