fabricioG
2 weeks ago
6591
7
General

How to round decemle number in php?

Posted 2 weeks ago by fabricioG

Hi, I want to make decemle number.

in my blade, I write this code

{{($sub /$Tot)*100 }}%

My output is

42.857142857143%

I need to get output in this format

42%

What i tried this code below but i get same value

{{round(($sub /$Tot)*100) }}%

Any tips how to fix this?

Please sign in or create an account to participate in this conversation.