Reputation: 13
I'm hoping to do some math operations on numbers being represented as strings. So far, I haven't found anything that could do multiplication.
Thanks!
Upvotes: 1
Views: 576
Reputation: 12332
http://www.php.net/manual/en/function.bcmul.php
bcmul — Multiply two arbitrary precision number
string bcmul ( string $left_operand , string $right_operand [, int $scale ] )
Multiply the left_operand by the right_operand.
Upvotes: 0
Reputation: 12542
You need of the bcmul()
method. You too can take a look on BC Math
functions.
Example:
echo bcmul('2.123456', '4.7891011', 6); // 6 is the precision
Upvotes: 3