title: convert URLDecoder.decode(temp, "UTF-8") to php
body: <p>I am converting a Java Servlet web application to php. </p>
  
  <p>How should I convert the following Java commands to php?</p>
  
  <pre><code>String temp = request.getParameter("q");
  String temp2 = URLDecoder.decode(temp, "UTF-8");
  </code></pre>
  
  <p>Any help will greatly appreciated...</p>
  
  <p>EDIT: </p>
  
  <p>This is client code:</p>
  
  <pre><code> var myJSONText = playlist.serialize();
  
    $.ajax({
         type : 'POST',
         url : "playlisthandler.php",
         data : {
             "q" : encodeURIComponent(myJSONText)
         },
         success : function(response) { ... },
         error : function(response) { ... },
         dataType : "json"
     });
  </code></pre>
  
  <p>Are you saying that the encodeURIComponent is redundant?</p>