slugify.php
Table of Contents
Functions
- slugify() : string
- Converts a string into a URL-friendly slug.
Functions
slugify()
Converts a string into a URL-friendly slug.
slugify(string $source[, string $separator = '-' ]) : string
The transformation transliterates accented Latin characters to ASCII (via
latinize()), lower-cases the result, replaces every run of characters
that are not a-z or 0-9 with $separator, and trims leading/trailing
separators.
Parameters
- $source : string
-
The input string.
- $separator : string = '-'
-
The separator inserted between words. Default
-.
Tags
Return values
string —The slugified string (lower-case ASCII, words joined by $separator).