[Pugged] Function variable question

Lathrop Preston ciapug@ciapug.org
Fri, 22 Nov 2002 11:39:34 -0600


At 10:29 AM 11/22/2002, you wrote:
>function getfunky($var1, $var2, $var3){
>   // how to get funky
>}
>
>Q: $var3 is something that may not get used every time I use this 
>function. I am curious how to make this variable optional?

function getfunky( $var1, $var2, $var3  = "*NOTUSED*"){
         //how to get funky
                 // with code to ignore $var3 if == *NOTUSED*
}

or
function getfunky( $var1, $var2, $var3  = default){
         //how to get funky
                 // where default == a default value
}

that ZEND thing was confusing to me...

Laith