Snippet Name: Find Percentage Function
Description: A simple function that takes two parameters ($int1, $int2) and uses them to calculate the percentage.
Also see: » Calculate days between any two dat...
» Calculate the difference between t...
» Date Functions: Calculate elapsed ...
» Calculate date of Easter Sunday
» Calculate TIMEDIFF with mysql vers...
» Calculate Pi
» Calculate time difference between ...
» Number Functions: Calculate ratio ...
» Calculate Zipcode Distances
» Calculate Distance From Latitude a...
» Calculate File/Folder Size In A Di...
Comment: (none)
Author: CoderZone
Language: PHP
Highlight Mode: PHP
Last Modified: December 02nd, 2010

<?php
Function get_percentage($int1, $int2) {
$per = $int1 / $int2;
$res = $per * 100;
return $res;
}
?> 