hello i have a problem with the % sign in to the url links

for example my url is

http://www.site.com/1411/The-trafic-is-increased-to-20%-this-year

that % is used like a variable in browsers and is not clickable in IE 8 or it gives errors in others browsers!

removing % is not an option because the url is used for the title [ The trafic is increased to 20% this year ]..

i try to use ascii % but is not working because the link in the href="" is tranformed with % inside!

somebody knows how to escape % (PERCENT SIGN) in to the URL and not being used like a variable by the browsers?

thanks pritaeas, but i don't like urlencode :D maybe is some other option to escape % like an escape char \% ?

thanks pritaeas, but i don't like urlencode :D maybe is some other option to escape % like an escape char \% ?

What about encoding whole url part after 1411 with base64encode

thanks ppl, i found the escape char wich is #% and works perfectly! i use only str_replace, using urlencode or other function like base64encode make links not so friendly with users thats the reason i don't want to use it. Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.