We help IT Professionals succeed at work.

feet and inches to inches

rgb192
rgb192 asked
on
378 Views
Last Modified: 2013-11-25
turn this feet-inches to inches conversion
$inches = current(explode("'", $height)) * 12 + end(explode("'", rtrim(trim($height), '"')));

to

an object oriented method (not just a procedural function) that accepts feet-inches as a parameter and returns inches
Comment
Watch Question

Principal Data Engineer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
that addition temp[0] (feet) + temp[1] inches makes code easy to understand

thanks
Mark BradyPrincipal Data Engineer
CERTIFIED EXPERT

Commented:
You're welcome
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.