Function Var or No Var
| From: | Abe Asghar | Date: | Fri, 05 Jan 2001 11:42:47 +0000 |
| Subject: | Function Var or No Var | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32870@lists.php.net to get a copy of this message | ||
Hey guys,
I have a function in an external file. It is a footer function and is
called on many pages. Now I want to pass it a varible from only one or two
pages. However the problem is that I want to pass it a variable from one
page and not from other pages e.g.
1.
DisplayFooter();
and
2.
DisplayFooter($currentpage);
The function is set up to recieve the variable - doing this I get a warning
message where it is not sent a variable as in example 1.
Is there a way to have a function that can take a variable and not produce
an error or have a default value if not sent a varible or value.
Thanks for any help.
Abe