> Sent: Thursday, May 09, 2002 3:02 PM
> To: 'Php-Win (E-mail)'
> Subject: [PHP-WIN] Simple function question
>
>
> Ok, I just read a section in a book about functions. In my cost I have
> some variables set:
>
> $var1 = "1";
>
> And I
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
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;
}
I get horrible errors though. In the book it talked