Пример #1
0
function convert_area($value, $from_unit, $to_unit)
{
    $meter_value = convert_to_square_meters($value, $from_unit);
    $new_value = convert_from_square_meters($meter_value, $to_unit);
    return $new_value;
}
function convert_area($value, $from_unit, $to_unit)
{
    $square_meter_value = convert_to_square_meters($value, $from_unit);
    $new_value = convert_from_square_meters($square_meter_value, $to_unit);
    if (empty($square_meter_value)) {
        return "Please enter a value.";
    } else {
        return $new_value;
    }
}