Sunday, 15 August 2010

percentage - php percent calculation -



percentage - php percent calculation -

how implement calculation of percents:

$x=3; $y = 100\$x; // 3.333.. $x*$y - , here need 100 without observational error

any ideas?

what mean observational error? backslash not partition symbol.

$x = 3; $y = 15; $percent = $x/$y; $percent_friendly = number_format( $percent * 100, 2 ) . '%';

php percentage

No comments:

Post a Comment