Hi I'm trying to convert Millimeter (mm) to Inch (in) and Kilogram (kg) to Pound (lb) Convert in PHP. Is there any function that does this ? How would I do this ? Thank you.
You can write your own functions like this very easily.
function mmToIn ($val) {
return $val * 0.0393701
}
function kgToLb ($val) {
return $val * 2.20462
}
I think you need write you own code for these operations (cos I have never heard about any built in function that doing what you want).
First: https://www.google.com/search?q=millimeter+to+inches
Second:
function mil_to_inc($mil) {
$inc = 0.0393700787;
return $mil * $inc;
}
// example
$_5_mil_to_inc = mil_to_inc(5); // will give you 0.196850394 etc..