You can do something like this: function myFunction($a = "hello", $b = "world") { }
Both arguments are optional and have default values. This is in the documentation. -- Ben Sinclair [EMAIL PROTECTED] ----- Original Message ----- From: "Malte Fucks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 18, 2001 2:17 PM Subject: [PHP] function arguments Hi, how do i tell a function which arguments can be passed and which must be passed... example: function func($arga, $argb, $argc) { do_something_with_arga; do_another_thing_with_argb; and_if_argc_was_passed_do_something_with_it_too; } because i dont want to pass argc if i dont need it, and to pass void arguments like '' is annoying... -- 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]