RE: Re: Convert Feet to Metres

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Shaun wrote:
> > Hi,
> > 
> > I am trying to create a function that will convert metres 
> to feet and vice 
> > versa. After searching Google I have found that 1 meters = 
> 3.2808399 feet. 
> > However if someone enters 10.5 to mean 10 feet and 5 inches 
> this is not the 
> > same as 10 feet and half a foot as there are 12 inches in a foot!
> > 
> > Is there a standard conversion for this problem? 
> 
> Make the interface clear (perhaps have separate text boxes 
> for metric or 
> imperial entry) so that they enter Feet and Inches rather 
> than a decimal 
> notation, which is not common anyway. Then calculate the 
> total inches, 
> multiply by 25.4 and divide by 1000.
> 
> Of course you also need to handle fractions... Most Americans 
> I believe 
> (I'm English) would write 10 5/16" for example.


Americans would also commonly write:

10'-5 3/4"

To mean 10 feet, 5 and 3/4 inches

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux