if (($screen) && ($tv_inches)) { if ($screen == 'Front Projection') { $result = round($tv_inches * 1.66); } else { $result = round($tv_inches * 2); } $result1 = floor($result / 12); $result2 = $result % 12; $result = "$result1 Feet $result2 Inches"; $calc_msg = "The Optimum Distance to Sit From Your $screen Screen is $result."; } elseif (($screen) && (($feet) || ($inches))) { $inches = $inches + ($feet * 12); if ($screen == 'Front Projection') { $result = round($inches / 1.66); } else { $result = round($inches / 2); } $calc_msg = "Your Optimum $screen Screen Size is $result Inches."; } ?>