special characters in url - htmlspecialcharacters()
<p>I have wasted about an hour, on my server for some reason htmlspecialcharacters() doesn't seem to work. If my url is</p>

<p><a href="http://site.com/phpfile/it" rel="nofollow">http://site.com/phpfile/it</a>'s-my-life</p>

<p>if I get this using $_GET['var'] it shows</p>

<p>it?s-my-life</p>

<p>now I have tried converting it from htmlspecialcharactedrs(), urlencode(), urldecode() etc but it doesn't seem to work.. what I am doing wrong, how can I get the exact queryString from the url so that it will display as exactly as it is..</p>

<p>it's-my-life</p>

<p>regards</p>
