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 default value', $Fourth = 'fourt arguments default value'){
some stuff here
}
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php