Welcome Guest, Not a member yet? Register   Sign In
URL friendly words
#1

[eluser]omed habib[/eluser]
Is there a built in function that can take a word and create a URL friendly string that can be passed in the URL?

For example:

A starter's assesment and/or functionality.

can be converted to:

astartsassessmentandorfunctionality



Thanks!
#2

[eluser]Phil Sturgeon[/eluser]
urlencode() ?
#3

[eluser]座頭市[/eluser]
The Inflector helper has a few functions for string conversion like that.
#4

[eluser]frenzal[/eluser]
url_title()

it defaults to using dashes (-) as seperator (which is better for SEO) but if you want your words stuck together i think you can do this url_title($string, "") the second parameter should be the seperator char




Theme © iAndrew 2016 - Forum software by © MyBB