Re: How to make an argument optional...confirmation...

From: Date: Fri, 22 Aug 2003 03:22:55 +0000
Subject: Re: How to make an argument optional...confirmation...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-160384@lists.php.net to get a copy of this message
Great, thanks!! On Thu, 2003-08-21 at 22:20, Tom Rogers wrote: > Hi, > > Friday, August 22, 2003, 12:55:37 PM, you wrote: > JV> I want to create a function with an optional argument/parameter but have > JV> never read a concrete answer on how to do it. > > JV> This is what I am assuming > > JV> function test(arg1,arg2,arg3 = null) > JV> { > JV> arg3 will be optional > JV> } > > JV> is this correct? > > Yes that is correct, you don't have to use null any value can be put > in as a default.

« previous php.general (#160384) next »