I have a height dropdown, but its missing ’10, ’11, ’12, inches from the foot due to php going straight up a number once it hits .10, which it should.
I figured maybe an if statement around the values area that detects the decimal being .9 and then automatically adding .10, .11, .12. However I wondered if anyone had anything neater?
public function load_heights() {
$from = 5;
$to = 7;
$values = array();
while ($from <= $to) {
$values[''.$from.''] = $from.' "';
$from += 0.1;
}
return $values;
}
Proper height characters instead of
'needed