[ create a new paste ] login | about

Link: http://codepad.org/6Dw3gkeC    [ raw code | output | fork ]

cms - PHP, pasted on Sep 4:
1
2
3
4
5
6
7
8
9
10
<?

function urlFriendly($title) 
{
    $title = preg_replace(array('/[^\w\s]/i', '/\s+/i'), array('','-'), $title);
    $title = substr(strtolower($title), 0, 70);
    return $title;
}

echo urlFriendly("SQL Server 2005 - Deny View of “Security”, “Server Objects”, “Replication” and “Management”?");


Output:
1
sql-server-2005-deny-view-of-security-server-objects-replication-and-m


Create a new paste based on this one


Comments: