Reputation: 1914
URL: example.com/search:#searchWord
Since the #
is not send to the server, it is changed to %23
.
In the search page I want to display
Results for: #searchWord
But what I get is %23searchWord
. I tried htmlspecialchars()
, but nothing happens.
Upvotes: 0
Views: 5968
Reputation: 14939
echo urlencode('example.com/search:#searchWord');
// output: example.com%2Fsearch%3A%23searchWord
echo urldecode('example.com%2Fsearch%3A%23searchWord');
// output: example.com/search:#searchWord
Upvotes: 1