Hi all,
How can I declare a global array? Can I do this:
$global myArray[]
would I find out it is an array when I use it in other places?
Thanks,
Wee
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
]'
Subject: AW: [PHP] help with PHP global array
I would try:
global $myArray[]
Greetings Björn
-Ursprüngliche Nachricht-
Von: Wee Chua [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
Gesendet: Donnerstag, 7. Februar 2002 16:35
An: PHP (E-mail)
Betreff: [PHP] help with PHP global
: Thursday, February 07, 2002 10:57 AM
To: '[EMAIL PROTECTED]'
Subject: AW: [PHP] help with PHP global array
I would try:
global $myArray[]
Greetings Björn
-Ursprüngliche Nachricht-
Von: Wee Chua [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
Gesendet: Donnerstag, 7. Februar
All variables in PHP are local to the scope in which it is defined. You
cannot declare a variable as global (as such). To use a global variable:
This is true. But I believe that the original question was actually
the other way around... Make a local variable into a global one.
The way to do
4 matches
Mail list logo