On 7/3/05 1:33 AM, "Tom Rogers" <trogers@xxxxxxxxxx> 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) ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php