<? function MyFunc($item, $args="") { extract((isset($args)?$args:array())); return("$item, $first_arg$second_arg$third_arg"); }
//call MyFunc() echo MyFunc("hi there", array( "first_arg" => "my name ", "second_arg" => "is ", "third_arg" => "Jim.", )); // this will print // "hi there, my name is Jim." ?> Hope this helps. Jim Lucas ----- Original Message ----- From: "charlesk " <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 28, 2002 8:23 AM Subject: [PHP] mixed datatype > How do you make a function like > bool session_register (mixed name [, mixed ...]) > > What does the function look like that it can take unlimited arguments? > > Charles Killmer > > -- > 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] > > -- 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]