On Wed, 21 Jul 2004 13:39:32 -0500, Alex Hogan
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> How do I write a function with optional arguments? Is it possible in
> php?
>
> function myfunc($First, $Second,[$Third, $Fourth]){
> some stuff here
> }
>
Give them a default value and they become opti
You can use default arguments:
func foo($first, $second=2, $third=3 etc.
or look at
function func_num_args(...
HIH
Frank
At 01:39 AM 7/22/2004, Alex Hogan wrote:
Hi All,
How do I write a function with optional arguments? Is it possible in
php?
function myfunc($First, $Second,[$Third, $Fourth]){
Alex Hogan wrote:
Hi All,
How do I write a function with optional arguments? Is it possible in
php?
function myfunc($First, $Second,[$Third, $Fourth]){
some stuff here
}
Yes, it's in the manual, I recomend you read it first.
function myfunc($First, $Second, $Third = 'third arguments defa
check this link
simple example
http://perl.about.com/library/weekly/aa121002c.htm
On Wed, 21 Jul 2004 13:39:32 -0500, Alex Hogan
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> How do I write a function with optional arguments? Is it possible in
> php?
>
> function myfunc($First, $Second,[$Third, $F
4 matches
Mail list logo