RE: [PHP] blank function parameters

From: Date: Wed, 03 Nov 2004 15:42:29 +0000
Subject: RE: [PHP] blank function parameters
Groups: php.general 
Request: Send a blank email to php-general+get-201046@lists.php.net to get a copy of this message
[snip] If I defined a function with 4 parameters but only pass 3 I get an error. Is there anyway around this? I want to be able to set the missing parameter to a default value if it is not passed which works ok but How do I get rid of the error message? [/snip] http://us2.php.net/manual/en/function.func-num-args.php "func_num_args() may be used in conjunction with func_get_arg() and func_get_args() to allow user-defined functions to accept variable-length argument lists. "

« previous php.general (#201046) next »