the following script calculates a percentage:
<?php
function percent($num_amount, $num_total) {
$count1 = $num_amount / $num_total;
$count2 = $count1 * 100;
$count = number_format($count2, 0);
echo $count;
}
?>
which can be called by:
<?php percent(144, 12);?>
now I want to use this as a droplet which will app. be something like:
[[percentage?firstnumber=144&secondnumber=12]]
is there anyone who can help me here?