
function test () { $args = func_get_args(); //get all arguments into array foreach($args as $num=>$val) { echo '<p>'.$val.'</p>'; //print argument } }
The same useful functions:
func_num_args() -get num of passing arguments
func_get_arg(n) - get argument by it number