Phester wrote:
Is
it possible to define your own function so that it has optional
parameters?
Yes.
If so, how is that done?
Define a function, giving the last parameters a default value
<?php
function xyz($a, $b, $c=0, $d='localhost') {
// do nothing :-)
}
### and then call it
xyz(0, 0, 3, 'yahoo.com');
xyz(0, 0, 4); // same as xyz(0, 0, 4, 'localhost');
xyz(0, 0); // same as xyz(0, 0, 0, 'localhost');
?>
--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.