I want to pass the '&' operator in the query string. I tried to use urlencode and urldecode but it does not work. I'm doing it:
$abc="A & B";
$abc2=urlencode($abc);
Then I pass a value like this
<a href="hello.php?say=<?php echo $abc2 ?>"><?php echo $abc;?></a>
and get the value on the next page as
$abc=$_GET['say'];
$abcd=urldecode($abc');
echo $abcd;
but the conclusion is not A & B
What am I doing wrong?
source
share