function test($arg1, $arg2, $arg3 = )
{
if(isset($arg3))
{
// do whatever with $arg3
}
}
-Original Message-
From: Jonathan Villa [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 21, 2003 7:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to make an argument
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
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
3 matches
Mail list logo