> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to