title: I am getting error while setting decoded value to variable ? Is there any alternative for this?
body: <p>I am creating <code>change username function</code> in that, I am unable to set decoded value to variable in php </p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php
      $fullname=$_GET["Fullname"];
      $uid=$_GET["uid"];
      $uid=str_replace("@","",$uid);
      $uid=str_replace(".","",$uid);
      $filename="data/".$uid.".html";
      $data=file_get_contents($filename);
      $data= rtrim($data, "\0");
      $json_parse=json_decode(trim(stripslashes($data)),True);
      $obj=$json_parse[0];
      $obj-&gt;Fullname=$fullname;
      $saveddata=json_encode($obj);
      file_put_contents($filename,$saveddata);
      echo $saveddata;
      //echo $data;
  ?&gt;
  </code></pre>