Re: Passing arrays to functions

From: Date: Tue, 01 Aug 2000 08:06:37 +0000
Subject: Re: Passing arrays to functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9379@lists.php.net to get a copy of this message
On 1 Aug, 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. > > Thanks > Jeff Try declaring it as function foo($bar) -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#9379) next »