Return to Snippet

Revision: 10522
at January 3, 2009 10:15 by sveggiani


Initial Code
// name:		evGetPermalink
// version:		v0.1
// description:		generates a slug or permalink of a given string

function evGetPermalink( $text ) {

	$permalink = preg_replace('/[^a-zA-Z0-9-_ ]/', '', $text);
	$permalink = mb_strtolower( strtr( $permalink, " ", "-" ) );
	return $permalink;
}

Initial URL

                                

Initial Description

                                

Initial Title
evGetPermalink | generates a slug or permalink of a given string

Initial Tags

                                

Initial Language
PHP