RE: [PHP] Re: passing args to function?

From: Date: Mon, 10 Sep 2001 17:34:12 +0000
Subject: RE: [PHP] Re: passing args to function?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66788@lists.php.net to get a copy of this message
ah! thanks Moody. silly jaxon, kicks are for trids. cheers, j > -----Original Message----- > From: Moody [mailto:php-list@infoscience.ltd.uk] > Sent: Monday, September 10, 2001 1:01 PM > To: php-general@lists.php.net > Subject: [PHP] Re: passing args to function? > > > > I'm having a bit of a hard time passing in a constant to a user-defined > > function. > > > > the calling page - index.php: > > <html> > > <?php > > include define_foo.php; > > function_foo(bar); > ^ > should be: > foo("bar"); > > [snip] > > > <?php > > function foo($value) > > { > > global $value, $page_id, $usr, $pass, $database, $host; > ^ > No need to declare $value as global . Already passed as arg > > [snip] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#66788) next »