View Full Version : Problem with # and & symbol.

11-04-2009, 06:19 AM
Hi all,

I am facing problem in getting values of parameters which contain # and & symbol.I am sending few parameters to some other page but when I am trying to print that value in PHP page then the value after these symbols becomes NULL automatically.Can any one tell how to fix this problem.

11-04-2009, 08:23 AM
You mean like a string over _GET for example? You'll need to encode special characters on it with urlencode() before sending it.

$string = '#1&';
print '<a href="mypage.com?string=' . urlencode($string) . '">Link</a>';