PHP math question -


Let's say I divide it by 100 times so that the percent is received 93.33333333333333 How can I show it using 93.3% php?

Here is the code.

  $ percent = ($ average / 15) * 100;  

The sprintf function is created for this (this See also)):

  resonant sprinkle ('% .1f %%', $ percent);  

Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

unix - Listing all shared memory segments used by a process on AIX5.3+ -