Click here to Skip to main content
15,845,681 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Example Text : Grade A+ is our text message.........

But Plus sign will be replaced in White space..............

How to rectify....??????????????????

What I have tried:

$b=str_replace("+","%2B",$a);

Urlencode
Posted
Updated 21-Feb-17 1:54am

 
Share this answer
 
Try this experiment:
First, create a php file called page1.php with:
<?php
$msg='Grade A+';
?>
<a href="page2.php?msg=<?php echo urlencode($msg);?>">send message to page2</a>
, then create a second one called page2.php with:
<?php
echo $_GET['msg'];
?>
Start the Apache, launch page1.php on the browser and see the outcome.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900