Here I am faced with an issue that I believe(or at least hope) was solved 1 million times already. What I got as the input is a string that represents a length of an object
The Zend Framework has a measurement component for just that purpose. I suggest you check it out - here.
$unit = new Zend_Measure_Length($length,Zend_Measure_Length::YARD); $unit -> convertTo(Zend_Measure_Length::METER);