On 7/3/05 1:33 AM, "Tom Rogers" <[EMAIL PROTECTED]> 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
Hi,
Saturday, July 2, 2005, 6:57:07 PM, you wrote:
S> The lack of a specific type to store monetary values is something of a
S> problem with commercial applications. Be it that you have value added tax
S> or sales tax to add per-item to an invoice or any other calculation like
S> commissions, dis
2 matches
Mail list logo