Function definition: how to make default argument an empty array?
| From: | Michael Jurgens | Date: | Sat, 22 Dec 2001 12:17:49 +0000 |
| Subject: | Function definition: how to make default argument an empty array? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78559@lists.php.net to get a copy of this message | ||
Hi,
As you all may know, this is how you set an optional second argument, that
defaults to acidophilus
function makeyogurt ($flavour, $type = "acidophilus")
{ }
I'm now looking for a way to have the second (optional) argument be an array
of strings. I can't get it to work though...
In pseudo-code:
function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
{ }
Any help would be much appreciated,
Michael