Welcome Guest, Not a member yet? Register   Sign In
Convert input to alias
#1

[eluser]Iwasignited[/eluser]
Hello,
Im writing a blog application as my first PHP app with CI.
I have a question.
When the administrator posts a new entry with title, body. I want to convert the title input to alias and store it in my database in order to make the URL nicer with SEO.
For example: My First Entry -> my-first-entry or something like that.

Please help me.
Thanks.
#2

[eluser]Mareshal[/eluser]
I am telling you what to do, and you implement it Smile.

clean your URL of ", ', 's and other buggy chars
break your url into pieces depending on  ( ) - space, explode()
foreach on your array and make a new string, by adding "-".




Theme © iAndrew 2016 - Forum software by © MyBB