Re: Creating optional arguments
- From: Siv Hansen <sivh@xxxxxxxxxxxx>
- Date: Sun, 16 Oct 2005 11:30:41 +0200
Mazin07 wrote:
Let's say I have
function dosomething ($var1, $var2, $var3) {
...
}
How do I make $var3 optional so that I can pass only 2 arguments and still have it work?
function dosomething($var1, $var2, $var3='somevalue'){
..
}
.- Follow-Ups:
- Re: Creating optional arguments
- From: scott Johnson
- Re: Creating optional arguments
- References:
- Creating optional arguments
- From: Mazin07
- Creating optional arguments
- Prev by Date: Re: session expiration
- Next by Date: Re: Professional Applications Devolpment
- Previous by thread: Re: Creating optional arguments
- Next by thread: Re: Creating optional arguments
- Index(es):