Hi all!

I'm trying to create an a to z listing on my wordpress site. The letters are altering mysql query (with hyperlink and get method) so it would return only posts starting with the letter clicked by user.

The problem is that i have characters that should not be in urls (?,Ő, etc). So, of course, the solution should be urlencode... end here comes the problem: (example)

PHP Code: 
$letter="?";
$encodeit=urlencode($letter);

echo 
"<a href='./?letter=".$encodeit."' >Letter is: $letter </a>"
So, my problem is with this code: the browser (both firefox and chrome) always decodes automatically the encoded letter. If i just echoing the encoded letter, i get the needed values (like %C5%90) but if i pass them to a hyperlink (so user could click them) the browser automatically decodes it (if i open the source of the page, it is encoded there too, but if i click on the hyperlink, it opens the hyperlink with the decoded character.)

What should i do?

ps.:
So, for example, the created hyperlinks source code (not the above letter)
Code: 
<a href="./?page_id=157&amp;betu=%C5%90"><span class="azheadletter">So in the source code everything is all right</span></a>
But after clicking on it, in the browser bar, the letter is decoded (and if i'm echoing the get parameter on the hyperlinked page, i get back the decoded character, not the encoded)
mahjong Reviewed by mahjong on . php urlencode problem Hi all! I'm trying to create an a to z listing on my wordpress site. The letters are altering mysql query (with hyperlink and get method) so it would return only posts starting with the letter clicked by user. The problem is that i have characters that should not be in urls (?,Ő, etc). So, of course, the solution should be urlencode... end here comes the problem: (example) $letter="?"; $encodeit=urlencode($letter); Rating: 5