Skip to content
Advertisement

Tag: mysql

How to show round figure number in php?

I have a variable called $totalResults which has dynamic values, depend on database entries. I need to show a limit like if $totalResults has 154 results then I want show that 154 out of 500. But I want it dynamically, like if the result cross 500, example the result value is 514, then it’ll show like 514 out of 1000.

Advertisement