Answered
PHP Decimal Point Help
I am working on a payroll application written in PHP and
MYSQL.
I need to find a way to make the final pay amount render correctly from two variable.
The code (shown below) I have written in PHP for the $pay_amount is causing the deciaml to read as $75.5 instead of $75.50.
$pay_amount = $total_hours * $hrate;
Can someone please help me find a way to make the $pay_amount decial point / currency read correctly?
PS - I am new to PHP but catching on quickly - so try to make the responce as easy to understand!
Thank in advance!
I need to find a way to make the final pay amount render correctly from two variable.
The code (shown below) I have written in PHP for the $pay_amount is causing the deciaml to read as $75.5 instead of $75.50.
$pay_amount = $total_hours * $hrate;
Can someone please help me find a way to make the $pay_amount decial point / currency read correctly?
PS - I am new to PHP but catching on quickly - so try to make the responce as easy to understand!
Thank in advance!
