Re: passing args to function?

From: Date: Mon, 10 Sep 2001 17:01:08 +0000
Subject: Re: passing args to function?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-66780@lists.php.net to get a copy of this message
> 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]

« previous php.general (#66780) next »