I am displaying a drop down of height and it content float values. When I displaying this drop down on edit form, not showing old value of height as selected in it.
I want to show 5.6 ft height value as selected in my drop down having values from 4, 4.1, 4.2....6.10, 6.11, 7 etc.
Following is the code that I used
<select name="height">
<?php for($height=(4.0); $height <= 7; $height=($height+0.1) ): ?>
<option value='<?php echo $height;?>' <?php if((5.6) == ($height)) echo "selected=selected"; ?> ><?php echo $height;?> ft</option>
<?php endfor;?>
</select>
Is any one know solution to this issue ? Please help.