Voting

: one plus four?
(Example: nine)

The Note You're Voting On

T.M.
20 years ago
Simple function to calculate average value using dynamic arguments:
<?php
function average(){
return
array_sum(func_get_args())/func_num_args();
}
print
average(10, 15, 20, 25); // 17.5
?>

<< Back to user notes page

To Top