- func_get_arg: documentation ( source)
<?php
function itemsasd(){
$args = array();
for($i = 0 ; $i < func_num_args(); $i++) {
$args[$i] = func_get_arg($i);
}
foreach($args as $arg){
echo $arg;
}
}
function showmessage($message = "msg"){
echo $message;
}
showmessage();
showmessage("blah");
itemsasd(1,2,3);
?>