// Setup the function like this
function runvar ($var1) {
...
}
// Call it like this
runvar($var1);
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
> -Original Message-
> From: Matt Babineau [mailto:[EMAIL PROTECTED]]
> Sent:
At 03:02 PM 5/9/02 -0400, Matt Babineau wrote:
>Ok, I just read a section in a book about functions. In my cost I have
>some variables set:
>
>$var1 = "1";
>
>And I have a function I wrote that needs to utilize that variable.
>
>function runvar(){
>query database looking for $var1;
>
Use $GLOBALS['var1']
That will get the variable from the correct scope.
--
Scott Carr
OpenOffice.org
Whiteboard-Doc Maintainer
http://whiteboard.openoffice.org/doc/
Quoting Matt Babineau <[EMAIL PROTECTED]>:
> Ok, I just read a section in a book about functions. In my cost I have
> some varia