Re: Passing the Array as Parameter to either the function or object/class???

From: Date: Thu, 21 Oct 2004 14:26:43 +0000
Subject: Re: Passing the Array as Parameter to either the function or object/class???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199993@lists.php.net to get a copy of this message
On Thu, 2004-10-21 at 09:57 -0400, Scott Fletcher wrote: > Hi! > > I wanted to know is can it be done by passing the array as a parameter > to the function? > > I also wanted to know is is it possible to pass around the array in the > object-orientated feature like object/class stuffs? > yes and yes. ie: function foo($bar) { print_r($bar); } $myarray = array(1,2,3,4); foo($myarray); ouputs: Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) cheers, Robby -- /*************************************** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | robby@planetargon.com * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting & Development ****************************************/

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.general (#199993) next »