How to store values with the special characters into HTML hidden fields using PHP
<p>This may be a quite simple question but I can't figure it out. I need to store some value that contains special characters into HTML hidden fields using PHP such as <code>5' 5''</code> indicating the height of a person.</p>

<p>The value is stored into MySql database. I tried something like this</p>

<pre><code>echo "&lt;input type='hidden' id='ed_your_height' name='hd_your_height' 
value=".html_entity_decode($your_heigth)."/&gt;";
</code></pre>

<p>and</p>

<pre><code>echo "&lt;input type='hidden' id='ed_your_height' name='hd_your_height' 
value=".htmlentities($your_heigth)."/&gt;";
</code></pre>

<p>but it gives me the value <code>5'</code> instead of <code>5' 5''</code> in both the cases. I need to display these values in drop down and perform some comparisons. </p>

<p>How can I store values with the special characters into HTML hidden field then (retrieving from database)?</p>
