<?php function average() { return (array_sum(func_get_args()) / func_num_args()); } echo average(10,20,30,40,50,60,70);