how to decode something that is encoded with encodeUri()
<p>If you encode something using javascript's <code>encodeURI()</code> method, how do yo get the decoded string in PHP?</p>

<p>I have string <code>name= "salman mahmood"</code> which I'm sending via POST message to my server. When I <code>alert()</code> the string at client side it gives me "salman%20mahmood" after encoding. 
At server side I'm decoding it using <code>urldecode()</code> but the result I'm getting is "salman". Do I need a different method to decode? the <code>rawurldecode</code> isnt working either; I just need the value with the space restored back.</p>

<p>Edit: thanks every one for the suggestions but im writing the code as follows and it still doesnt work!!</p>

<pre><code>&lt;input type="text" id="chapterNumber" value=&lt;?php echo rawurldecode("chapter%20Two"); ?&gt; disabled="disabled"&gt; 
</code></pre>

<p>it only prints "chapter"</p>
