[PHP] 'undef' as an argument value

2002-03-11 Thread Rodent of Unusual Size
An odd request.. I want to have optional function arguments that *aren't* defined unless values are explicitly passed. Sorta the equivalent of function foo($arg1_required, $arg2_optional=undef) if (isset($arg2_optional)) { print "explicit"; } else { print "not passed

Re: [PHP] 'undef' as an argument value

2002-03-11 Thread Rodent of Unusual Size
Rick Emery wrote: > > function foo($arg1_required, $arg2_optional="") > if ($arg2_optional=="") { > print "not passed"; > } > else { > print "explicit"; > } > } No, I said 'undef' because I mean 'undefined'. The argument can have *any* value; I need to know when

Re: [PHP] 'undef' as an argument value

2002-03-11 Thread Rodent of Unusual Size
"Johnson, Kirk" wrote: > > http://www.php.net/manual/en/function.func-num-args.php will > return the number of arguments passed to the function. Bingo! That will do the trick.. Thanks *very* much! -- #kenP-)} Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/ Author, developer, op