Answers for "php - How do I calculate the percentage of a number?"

PHP
0

php - How do I calculate the percentage of a number?

//ENTER  PERCENT AND AMOUNT 
//IT WILL RETURN OUTPUT
//INTAKE: 2% OF 10
//OUTPUT : 0.2
function calc_percent($percent, $amt) {
  return  $output = ($per/100 * $amt);
}
Posted by: Guest on February-17-2022

Code answers related to "php - How do I calculate the percentage of a number?"

Browse Popular Code Answers by Language