function physical_weight_unit_name in Physical Fields 7
Returns the name of a weight unit of measurement.
Parameters
$type: The type of weight unit whose name should be returned; by default this can be lb, oz, kg, or g.
Return value
The name of the specified unit of measurement or FALSE if not found.
File
- ./
physical.module, line 644 - Defines fields (e.g. weight and dimensions) to support describing the physical attributes of entities.
Code
function physical_weight_unit_name($type) {
$units = physical_weight_units();
if (!empty($units[$type]['name'])) {
return $units[$type]['name'];
}
return FALSE;
}