Posted by Marco Tabini on 09/25/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) ?
[Reply to this message]
Copyright © 2005-2006 Powered by Custom PHP Programming