Welcome Guest, Not a member yet? Register   Sign In
Sanitize string for url
#1

Hi
I have some string (A & K Motel or A Fleur D'Eau or A La Belle Etoile - Yourtes / Yurt de la CJA)
I need encode this values and use their in address
example :
http://example.com/info/92h1-A & K Motel
or
http://example.com/info/92h1-A Fleur D'Eau or A La Belle Etoile

But i cannot use special character in address and i have to convert this character to readable character
example :
http://example.com/info/92h1-A--K-Motel

I need convert space or & character to readable character and use in address and get it in other controller and do query
Sorry for my bad question and details

Thanks
Reply
#2

Should use a "post" instead of a get.

Otherwise use the functions urlencode and urldecode.
Simpler is always better
Reply
#3

The url_title helper function might help you. It is used in the news tutorial.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB