Powered By Blogger

Thursday, November 9, 2017

convert feet and inch to cm in php

//$new_values[23]['value'] = 4'8";

$hegt = explode('\'', $new_values[23]['value']);
              $feet = $hegt[0];
              $inches = rtrim($hegt[1],"\"");
              $inches = ($feet * 12) + $inches;
              $cm = (int) round($inches / 0.393701);

No comments:

Post a Comment