title: How to give encodeURIComponent for a link
body: <p>I need to give encodeURIComponent for a link. This question is related to the answer of <a href="https://stackoverflow.com/questions/36533008/php-variable-error-in-unicode/36533094#36533094">PHP variable error in unicode</a>. please help me.</p>
  
  <pre><code>&lt;?php
  header('Content-Type: text/html; charset=utf-8');
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php
  $NewValue="";
  if(!empty($_GET['NewValue'])){
      echo $NewValue=$_GET['NewValue'];//this variable is the problem;
      }
  $Value="நன்றி";
  ?&gt;
  &lt;a href="test1.php?NewValue=&lt;?php echo $Value;?&gt;"&gt;Click here&lt;/a&gt;                
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>