I want to remove last digit from decimal number in PHP. Lets say I have 14.153. I want it to be 14.15. I will do this step till my number is no longer decimal.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
I think this should work:
The round second parameter sets the number of digits.
You can try this.
Live DEMO