September 2001
Intermediate to advanced
768 pages
32h 45m
English
string bcsub(string left_operand, string right_operand, [int scale])
| left_operand | Number to subtract from |
| right_operand | Number to subtract |
| scale | Number of decimal places to return |
Subtracts right operand from left operand.
Returns:
Subtracted number
Description:
bcsub() subtracts the second number from the first number and returns the result, formatted with a specified number of decimal places (optional).
Version:
Existing since version 3.0
Example:
$num1 = "9912343.34546";
$num2 = "34546.9912343";
echo bcsub($num1, $num2, 3);
Output:
9877796.354
|
Read now
Unlock full access