var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
Cleaner way of doing this distance conversion?
I'm coding a script that converts the US measurements to metric system and vice versa.
I'm having difficulty optimizing the meters to feet/inches code. It is functional and works, but I'm wondering if there is a way to clean it up a bit and make it more efficient.
In this code the variable, $char[ISheight] is in meters with a decimal.
Thanks in advance.
$f = sprintf("%01.1s",$char[ISheight]*39.3700787/12);
$i = sprintf("%01.3f",$char[ISheight]*39.3700787/12-$f);
$i = sprintf("%01.0f",$i/0.08333);
$char[USheight] = " $f', $i\"";
wow thats a big change in code
- Full service website development solutions since 2001.
(612)234-2768 - Locally owned and operated in the Minneapolis, Minnesota area.
Wow, thanks for the code xelhosting, it works great.