Thread: coding question
View Single Post
Old 01-17-2014, 04:41 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,055
Quote:
Originally Posted by Ketchup View Post
and the code on the actual profile page visible to public is


<p>Height:
<?=$detail['height'];?>


how do i make that ^ display as feet? Thanks!
Same as we did the select, just divide height by 12 (12 inches in a foot) and then get the remainder for the left over inches:

intval($height/12) . ' feet ' . ($height-(intval($height/12)*12)) . ' inches';
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook