View Single Post
Old 09-22-2006, 04:47 PM   #7 (permalink)
Zubes
Major Leagues
 
Zubes's Avatar
 
Join Date: Sep 2005
Location: Chicago, IL
Posts: 361
Thanks: 0
Thanked 0x in 0 posts
converting height

$total_inches = 0.3937008*$AR_result[ 'height' ];
$feet = $total_inches/12;
$inches=$total_inches%12;
then to display, all you need is this:

echo floor($feet)."' ".$inches."'';

i got it to work doing this. seems i forgot to strip the decimals and round down the first time, but i stumbled across it the other day, and sicne you had given up on it i had forgotten it.

but thanks for the big step in the right direction.
__________________
Phil Zuber

Beyond the Ivy - Commish, Twins GM
Stars and Stripes Baseball League - Cubs GM
Bricks and Ivy - Orioles GM

Sim Coalition - co-founder

Zubes is offline   Reply With Quote