function convert_volume($value, $from_unit, $to_unit) { $liter_value = convert_to_liters($value, $from_unit); $new_value = convert_from_liters($liter_value, $to_unit); return $new_value; }
function convert_volume($value, $from_unit, $to_unit) { $liter_value = convert_to_liters($value, $from_unit); $new_value = convert_from_liters($liter_value, $to_unit); if (empty($liter_value)) { return "Please enter a value."; } else { return $new_value; } }