PHP urldecode issue
<p>I'm posting the below javascript endcodeURI value via jquery to a PHP script, there I use urldecode and store the value in the db, but the '>' symbol is not stored.</p>

<pre><code>testid=174742228&amp;VI-42=zdddfsdsdf%3Edsdfsdfs%3Efsdfsdfs&amp;

+------+-----------+-----+-----+------------------------------+------+
| id   | testid    | sec | qid | ans                          | img  |
+------+-----------+-----+-----+------------------------------+------+
| 6510 | 174742228 | VI  |  42 | zdddfsdsdf dsdfsdfs fsdfsdfs | NULL |
+------+-----------+-----+-----+------------------------------+------+

foreach ($_POST as $k =&gt; $v) {
    $flds = explode("-", $k);
    if (count($flds) == 3) {
        $datai = array($flds[0], $flds[1], $flds[2], $testid, urldecode(mysql_escape_string($v)));
        $resi = $dbh-&gt;prepare("INSERT INTO result (sec, img, qid, testid, ans) VALUES (?, ?, ?, ?, ?)");
        $resi-&gt;execute($datai);
    } else {
        $data = array($flds[0], $flds[1], $testid, urldecode(mysql_escape_string($v)));
        $res = $dbh-&gt;prepare("INSERT INTO result (sec, qid, testid, ans) VALUES (?, ?, ?, ?)");
        $res-&gt;execute($data);
    }   
}
</code></pre>

<p>Thanks in advance</p>
