Skip to content

Instantly share code, notes, and snippets.

View carcabot's full-sized avatar

CarcaBot carcabot

  • Bucharest, Romania
View GitHub Profile
@carcabot
carcabot / url_slug.php
Created October 19, 2015 19:13 — forked from sgmurphy/url_slug.php
URL Slugs in PHP (with UTF-8 and Transliteration Support)
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.