arrays in function definition possible?

From: Date: Wed, 27 Dec 2000 07:28:13 +0000
Subject: arrays in function definition possible?
Groups: php.general 
Request: Send a blank email to php-general+get-31931@lists.php.net to get a copy of this message
Why won't this work? function useArray($foo[0]=3,$foo[1]=4) { } I get a parse error : expecting `')'' Can array info be passed into a function definition like this? I am able to call the function like this okay : useArray($foo[0]=3,$foo[1]=4); But defining defaults this way seems impossible. This is strange to me, please explain! My "workaround" is to define $foo array and make $foo global but ... TIA! __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/

« previous php.general (#31931) next »