Re: Passing arrays to functions

From: Date: Tue, 01 Aug 2000 08:06:19 +0000
Subject: Re: Passing arrays to functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9378@lists.php.net to get a copy of this message
On Tue, 1 Aug 2000, Jeff wrote: > Can I pass an array as an argument to a function? > > The function call <? echo foo($bar[]) ?> works fine, but > the function declaration function foo($bar[]) gives > a compile time error in php3 - "expected )". > > Someone please tell me what I did wrong. function foo($something) { echo gettype($something); } $a = array(1,2,3,4); foo($a); ->"array" Soeren Staun-Pedersen - staun@netwarriors.org ------ "The internet is full, beat it" - Me.

« previous php.general (#9378) next »