I am having trouble with an array, as follows:
Value in table: 5' 00"
Dropdown box displays all options correctly, however does not select the value equal to the value in the table.
Any ideas?
Thanks
Rob
And before anyone asks, the array format is:
" '3R_17 00"'=>'3R_17 00"' "
Without the _ between the 82 and 17
It just doesn't show that way on here.....
$defht1="";
$defht1 = array('UNKNOWN'=>'UNKNOWN','3’ 00"'=>'3’ 00"','3’ 01"'=>'3’ 01"','3’ 02"'=>'3’ 02"','3’ 03"'=>'3’ 03"','3’ 04"'=>'3’ 04"','3’ 05"'=>'3’ 05"','3’ 06"'=>'3’ 06"','3’ 07"'=>'3’ 07"','3’ 08"'=>'3’ 08"','3’ 09"'=>'3’ 09"','3’ 10"'=>'3’ 10"','3’ 11"'=>'3’ 11"','4’ 00"'=>'4’ 00"','4’ 01"'=>'4’ 01"','4’ 02"'=>'4’ 02"','4’ 03"'=>'4’ 03"','4’ 04"'=>'4’ 04"','4’ 05"'=>'4’ 05"','4’ 06"'=>'4’ 06"','4’ 07"'=>'4’ 07"','4’ 08"'=>'4’ 08"','4’ 09"'=>'4’ 09"','4’ 10"'=>'4’ 10"','4’ 11"'=>'4’ 11"','5’ 00"'=>'5’ 00"','5’ 01"'=>'5’ 01"','5’ 02"'=>'5’ 02"','5’ 03"'=>'5’ 03"','5’ 04"'=>'5’ 04"','5’ 05"'=>'5’ 05"','5’ 06"'=>'5’ 06"','5’ 07"'=>'5’ 07"','5’ 08"'=>'5’ 08"','5’ 09"'=>'5’ 09"','5’ 10"'=>'5’ 10"','5’ 11"'=>'5’ 11"','6’ 00"'=>'6’ 00"','6’ 01"'=>'6’ 01"','6’ 02"'=>'6’ 02"','6’ 03"'=>'6’ 03"','6’ 04"'=>'6’ 04"','6’ 05"'=>'6’ 05"','6’ 06"'=>'6’ 06"','6’ 07"'=>'6’ 07"','6’ 08"'=>'6’ 08"','6’ 09"'=>'6’ 09"','6’ 10"'=>'6’ 10"','6’ 11"'=>'6’ 11"','7’ 00"'=>'7’ 00"','7’ 01"'=>'7’ 01"','7’ 02"'=>'7’ 02"','7’ 03"'=>'7’ 03"','7’ 04"'=>'7’ 04"','7’ 05"'=>'7’ 05"','7’ 06"'=>'7’ 06"','7’ 07"'=>'7’ 07"','7’ 08"'=>'7’ 08"','7’ 09"'=>'7’ 09"','7’ 10"'=>'7’ 10"','7’ 11"'=>'7’ 11"','8’ 00"'=>'8’ 00"'
);
{
$defht2 = $row['defht'];
}
$selectHt1=""; $selected9="";
foreach($defht1 as $key9=>$val9)
{
if($key9==$defht2) $selected9 = " selected";
$selectHt1 .= "<option value='$key9'$selected9>$val9</option>";
$selected9 = "";
}
echo '<td>','<b><u>HEIGHT: </u></b>','<br><br>','<select name="defht" id="defht" onKeyUp="highlight(event)" onClick="highlight(event)"><option value="">Please Select</option>';
echo $selectHt1;
echo '</select>','</td>';