Rounding number to specified precision in php

0

PHP snippet for rounding number to specified precision. By default it will show 2 decimal places as set in default parameter, You can also give a number/parameter to show till ‘n’ decimal places. Have a look at the function below.

If you have any other technique to achieve the same, please share with us.

Share.
 

About Author

Entrepreneur & Dreamer

I am a passionate Software Professional, love to learn and share my knowledge with others.

Software is the hardware of my life.

Leave A Reply

CommentLuv badge

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.