Posted by Marco Tabini on 11/09/78 11:20
On 7/3/05 1:33 AM, "Tom Rogers" <trogers@kwikin.com> wrote: > function dollars2cents($value){ > $value = sprintf("%0.2f",trim($value)); > list($a,$b) = explode('.',$value); > if(floatval($value)<0) $b = $b*-1; //negative amount? > return intval($a)*100 + intval($b); > } Have you tried round ($value * 100) ?
[Back to original message]
Copyright © 2005-2006 Powered by Custom PHP Programming