note 20315 modified in function.func-num-args by danbrown

From: Date: Sat, 19 Jul 2008 21:55:32 +0000
Subject: note 20315 modified in function.func-num-args by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141773@lists.php.net to get a copy of this message
The idea of func_get_args() is to construct functions of variable number of parameters like <?php function var_param_func(){ if(func_num_args()==0){ //do one thing } if(func_num_args()==1) //do another thing //get the args with func_get_args() } } ?> --was-- The idea of func_get_args() is to construct functions of variable number of parameters like function var_param_func(){ if(func_num_args()==0){ //do one thing } if(func_num_args()==1) //do another thing //get the args with func_get_args() } } http://php.net/manual/en/function.func-num-args.php

« previous php.notes (#141773) next »