So sprach »Arcadius A.« am 2001-08-31 um 17:36:51 -0700 :
> Would this work ?
Kinda, but not really.
If you want to do this, you've got to stuff it all in one function, like
so:
function dunno($mandatory, $optional1 = NULL, $opt2 = NULL){
if (NULL === $optional1){
// behave, as if only $mandatory is set
echo 'mandatory is: ' . $mandatory;
return;
}
if (NULL === $optional2){
// behave, as if $man. and $opt1 have set
echo 'mand is : ' . $mandatory;
echo 'opt1 is : ' . $optional1;
return;
}
// neither $opt1 nor $opt2 are null
echo 'mand is : ' . $mandatory;
echo 'opt1 is : ' . $optional1;
echo 'opt2 is : ' . $opt2;
return;
}
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 2 hours 31 minutes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]